Krystals Nodes


Introduction to Moritz v1    Patch Editor    General Nodes    MIDI Nodes    Krystals Nodes    Ornaments    Assistant Performer
N.B. This page was last changed in December 2009. It has now been archived. Moritz v2 has no Patch Editor.
This page contains documentation for the krystal node and the following krystal construction nodes:
expansion       modulation       permutation       shaped expansion
These nodes can all be created from the main menu at Nodes / Krystals:
KrystalsNodesMenu.png
Except for the permutation node, these nodes all display their related file name (a krystal or operator name) in their text area. If such a name occurs more than once in a patch, it is coloured blue. See the example of an exploded shaped expansion krystal below.
krystal  
krystalNode.png
Input pin: none
Output pin: KrystalNamePin
Back-panel menu location: Nodes / Krystals
Shortcut: k
Uses background thread: no
Menu: krystalNodeMenu.png
This node represents a krystal. It can be loaded with a krystal of any type. The name of the loaded krystal appears on the node, and is the value of the output pin. The currently available krystal types are: constant, line, expansion, modulation, permutation and shaped expansion. These types are identifiable by name:
  • A constant krystal name begins with the characters ck
  • A line krystal name begins with the characters lk
  • An expansion krystal name begins with the characters xk
  • A modulation krystal name begins with the characters mk
  • A permutation krystal name begins with the characters pk
  • A shaped expansion krystal name begins with the characters sk

Non-standard context menu items:
  • load krystal: Opens a standard open file dialog pointing at the standard krystals folder. Any krystal type can be loaded into the node. The krystal’s name appears on the node.
  • explode: This menu item is enabled for expansion, modulation, permutation and shaped expansion krystals. It creates nodes (in the patch, to the right of the existing node) corresponding to the krystal’s ancestors.
    In each of the following examples, the leftmost node has been ‘exploded’:
    Exploded expansion krystal node:
    explodeExpansion.png
    Exploded modulation krystal node:
    explodeModulation.png
    Exploded permutation krystal node:
    explodeModulation.png
    Exploded shaped expansion krystal node:
    explodeShapedExpansion.png
    In this last example, two of the krystal nodes are identical, so Moritz automatically colours their texts blue. (One of the duplicate nodes could be deleted, and the disconnected input pin reconnected to the other one, without changing the patch’s logic.) Except for permutation nodes (whose text never changes), Moritz automatically colours the text of any duplicated krystal or krystal constructor node blue.
  • browse...: Opens a krystals browser with the current krystal selected, so that its ancestors and descendants can be inspected. See Moritz’s User Interface: Krystals Browser.
  • open strands window: This item is not available for constant krystals. For other krystal types, it opens a window displaying the krystal’s strands. The strands window opens left-aligned with its related kyrystal node, and its top at the top of the screen. The window for line krystals is high enough to display one strand, all other strands windows fit initially to the screen height.
  • new constant krystal...: Opens the Constant Krystal Editor, loading the resulting krystal into the current krystal node. See Krystals 4.0: Constant Krystal Editor.
  • new line krystal...: Opens the Line Krystal Editor, loading the resulting krystal into the current krystal node. See Krystals 4.0: Line Krystal Editor.
  • open expansion editor...: This item is only enabled for expansion and shaped expansion krystal nodes. It opens the Expansion Krystal Editor using the current krystal’s heredity data. When the editor closes, the new krystal is loaded into the current node.
  • open modulation editor...: This item is only enabled for modulation krystal nodes. It opens the Modulation Krystal Editor using the current krystal’s heredity data. When the editor closes, the new krystal is loaded into the current node.

Krystal Construction Nodes
expansion  
expansionNode.png
Input pins: KrystalNamePin, KrystalNamePin
Output pin: KrystalNamePin
Back-panel menu location: Nodes / Krystals
Shortcut: xk
Uses background thread: no
Menu: expansionNodeMenu.png
This node represents an expansion operator — an expansion field in a .kexp file. The expansion field’s name is displayed on the node.
  • Input pin 1: density input krystal
  • Input pin 2: points input krystal
  • Output pin: expansion krystal
An existing expansion operator can be loaded directly into this node or, alternatively, this type of node can be created, together with two krystal input nodes, by exploding an existing expansion krystal node. An expansion krystal node is a krystal node whose name is that of an expansion krystal.

This node behaves like all the other krystal construction nodes when its inputs are complete:
  • if a krystal having identical ancestors and expansion field does not already exist in the standard krystals folder:
    • the new krystal is created and saved with a new name.
    • a new expansion krystal node is created for the new krystal, to the left of this expansion node.
  • the output pin is set to the name of the new krystal.
  • the new output krystal node context menu item is enabled. It now displays the new output krystal’s name.
For this node, the open expansion editor... context menu item is also enabled when the inputs are complete. See Krystals 4.0: Krystals Expansion Editor.
The delete this expansion field completely context menu item is enabled if this expansion field is not used by any other expansion krystal in the standard krystals folder.

Here is an example of using the new output krystal node context menu item:
Given the patch:
expansionFieldDemo1.png
The following context menu is available:
expansionFieldDemo2.png
Choosing the new output krystal node menu item creates a new node in the patch, to the left of the expansion node, as follows:
expansionFieldDemo3.png
This new node is automatically created when the inputs are first expanded, but it can also be deleted. Krystal constructor nodes remember the values in their input pins, so removing and reattaching a wire with the same value will not create a new krystal, and no new node will be created.
modulation  
modulationNode.png
Input pins: KrystalNamePin, KrystalNamePin
Output pin: KrystalNamePin
Back-panel menu location: Nodes / Krystals
Shortcut: mk
Uses background thread: no
Menu: modulationNodeMenu.png
This node represents a modulation operator — a modulation field in a .kmod file. The modulation field’s name is displayed on the node.
  • Input pin 1: X-input krystal
  • Input pin 2: Y-input krystal
  • Output pin: modulation krystal
An existing modulation operator can be loaded directly into this node or, alternatively, this type of node can be created, together with two krystal input nodes, by exploding an existing modulation krystal node. A modulation krystal node is a krystal node whose name is that of a modulation krystal.

This node behaves like all the other krystal construction nodes when its inputs are complete:
  • if a krystal having identical ancestors and modulation field does not already exist in the standard krystals folder:
    • the new krystal is created and saved with a new name.
    • a new modulation krystal node is created for the new krystal, to the left of this modulation node.
  • the output pin is set to the name of the new krystal.
  • the new output krystal node context menu item is enabled. It now displays the new output krystal’s name. This item works exactly as for expansion operators. See above.
For this node, the open modulation editor... context menu item is also enabled when the inputs are complete. See Krystals 4.0: Modulation Krystal Editor.
The delete this field completely context menu item is enabled if the modulation field is not used by any other modulation krystal in the standard krystals folder.
permutation  
modulationNode.png
Input pins: KrystalNamePin, KrystalNamePin,
KrystalNamePin, IntPin, IntPin
Output pin: KrystalNamePin
Back-panel menu location: Nodes / Krystals
Shortcut: pk
Uses background thread: no
Menu: modulationNodeMenu.png
For a detailed description of how this node permutes krystals, see Krystal Permutation

This node creates a new krystal by permuting the values in its source krystal (the leftmost input krystal), using parameters set in the remaining input pins. In contrast to the other krystal construction nodes, the text on the node (“permutation”) does not change.
  • Input pin 1: The source krystal
  • Input pin 2: The axis input krystal
  • Input pin 3: The contour input krystal
  • Input pin 4: The permutation level — a positive, non-zero integer.
  • Input pin 5: Sort first? — an integer treated as a boolean value: 0 means no, any other value means yes
  • Output pin: permutation krystal name
This type of node can be created from the main Nodes / Krystals menu, or together with its inputs, by exploding an existing permutation krystal node. A permutation krystal node is a krystal node whose name is that of a permutation krystal.

This node behaves like all the other krystal construction nodes when its inputs are complete:
  • if a krystal having identical heredity information does not already exist in the standard krystals folder:
    • the new krystal is created and saved with a new name.
    • a new permutation krystal node is created for the new krystal, to the left of this permutation node.
  • the output pin is set to the name of the new krystal.
  • the new output krystal node context menu item is enabled. It now displays the new output krystal’s name. This item works exactly as for expansion operators. See above.
shaped expansion  
shapedExpansionNode.png
Input pins: KrystalNamePin, KrystalNamePin,
KrystalNamePin, KrystalNamePin
Output pin: KrystalNamePin
Back-panel menu location: Nodes / Krystals
Shortcut: sk
Uses background thread: no
Menu: shapedExpansionNodeMenu.png
This node represents a shaped expansion operator — an expansion field in a .kexp file. The expansion field’s name is displayed on the node.
  • Input pin 1: density input krystal
  • Input pin 2: points input krystal
  • Input pin 3: axis input krystal
  • Input pin 4: contour input krystal
  • Output pin: shaped expansion krystal
An existing expansion operator can be loaded directly into this node or, alternatively, this type of node can be created, together with four krystal input nodes, by exploding an existing shaped expansion krystal node. A shaped expansion krystal node is a krystal node whose name is that of a shaped expansion krystal.

This node behaves like all the other krystal construction nodes when its inputs are complete:
  • if a krystal having identical ancestors and modulation field does not already exist in the standard krystals folder:
    • the new krystal is expanded, shaped and saved with a new name
    • a new shaped expansion krystal node is created for the new krystal, to the left of this node.
  • the output pin is set to the name of the new krystal.
  • the new output krystal node context menu item is enabled. It now displays the new output krystal’s name. This item works exactly as for expansion operators. See above.
For this node, the open expansion editor... context menu item is also enabled when the inputs are complete. See Krystals 4.0: Krystals Expansion Editor.
The delete this expansion field completely context menu item is enabled if this field is not used by any other expansion krystal in the standard krystals folder.

A shaped expansion krystal contains contoured strands, and is equivalent to an expansion krystal whose strand values have been permuted by the permutation node.  Krystals with identical strands can be produced either by using the shaped expansion node or the expansion node followed by the permutation node: first create an expansion krystal using the density and points inputs, then permute the resulting krystal using the axis and contour inputs (at the level of the expansion krystal, with sort first set to true). For a more detailed description of how this works, see Krystal Permutation.

Introduction to Moritz v1    Patch Editor    General Nodes    MIDI Nodes    Krystals Nodes    Ornaments    Assistant Performer