Pattern Modules

Pattern modules are generative; they generate patterns or values according to their control inputs.


Random RandInt RandWalk Probability Corruption Feedback FuncGen Lissajous


Random

Produces a non repeating random floating point number from 0 to 1. For a repeating random number sequence, use a Sequencer module initialized with a random pattern.

This module has a user settable number of outputs, with a separate RNG for each output. To change the number of outputs, click on the blue-label property button on the upper right of the module, and click on the "More" or "Fewer" button on the Outputs tab. You have the option to set custom input labels and tool tips if you like.

You also have the option, by checking the box at the bottom of the property dialog, of setting the module to produce a new value on Change instead of Strobe.

Output:

Out N: Random decimal fraction between 0 and 1.

Input:

Strb (Chng): Strobe (change) produces new random values.


RandInt

Produces a non repeating random integer from 0 to Range (+ offset). For a repeating random number sequence, use a Sequencer module initialized with a random pattern.

This module has a user settable number of outputs, with a separate RNG for each output. To change the number of outputs, click on the blue-label property button on the upper right of the module, and click on the "More" or "Fewer" button on the Outputs tab. You have the option to set custom input labels and tool tips if you like.

You also have the option, by checking the box at the bottom of the property dialog, of setting the module to produce a new value on Change instead of Strobe.

Output:

Out N: Random integer from 0 to Range (+ offset).

Input:

Strb (Chng): Strobe (change) produces new random values.

Range: Upper limit of random integer.

Ofst: Offset added to random integer.


RandWalk

Produces a random walk ("1/f") pattern, with each step, while random, determined by the preceding steps. The delta, or step range, can by adjusted, as well as the low frequency, "wander" component, along with the propensity to wander up or down.

This module has a user settable number of outputs, with a separate RNG for each output. To change the number of outputs, click on the blue-label property button on the upper right of the module, and click on the "More" or "Fewer" button on the Outputs tab. You have the option to set custom input labels and tool tips if you like.

You also have the option, by checking the box at the bottom of the property dialog, of setting the module to produce a new value on Change instead of Strobe.

Output:

Out N: Random integer from 0 to Range (+ offset), and within +/- Delta of previous value, with probability that it will continue in the same direction set by the relative Up & Down inputs.

Input:

Strb (Chng): Strobe (change) produces new values.

Delta: Maximum change per step.

Range: Upper limit of generated value.

Ofst: Offset added to generated value.

Up: Bias to favor upward motion (0.0 to 1.0).

Down: Bias to favor downward motion (0.0 to 1.0).


Probability

Produces a probability distribution, according to the slider settings in the Property dialog, available by clicking on the blue-label property button on the upper right of the module.

For each step the module will output an index value according to the probability table set by the sliders in the Property dialog. Slider values set to 0 have zero probability and are ignored, all other values have a probability that is the normalized ratio of all non zero values. As you change the slider positions the probability in percent is displayed on the labels just under the sliders.

An important concept in using the Probability module, is that the values it returns are indexes of the sliders number, not the slider values you set. This means, for example, if the table is set to all zeros except for index 7 which is set to 3, the output will always be 7, which is the index of the only value in the table that is not zero. If you also set index 20 to 6, then 33% (1/3) of the time the output will be 7 (the index set to 3) and 67% (2/3) of the time the output will be 20 (the index set to 6). The math: 6+3=9; 3/9 is 1/3; 6/9 is 2/3.

You can use this module in many different ways. For example, you can make it produce specific pitch (or whatever) values in probability ratios you specify by setting the indexes to the relative probability you want, and then using the output directly. For example, produce a root, 3rd, 5th, and octave by setting index 0 (root), 4 (3rd), 7 (5th), and 12 (octave) to whatever values you like. All other values in the table should be 0. The module will produce the index values of 0, 4, 7, and 12 according to the relative "weights" of these indexes in the table.

You can also map, or translate, the indexes produced by the Probability module to more meaningful values by connecting the output of the Probability module to the input of a PitchMap module and adjusting the corresponding PitchMap values to whatever you want as the "real" output. This works equally well with Sequencer or Array modules for non pitch values.

This module has a user settable number of outputs, with a separate probability run for each output. To change the number of outputs, use the Up/Down control labeled #Outs.

You also have the option, by checking the box at the bottom of the property dialog, of setting the module to produce a new value on Change instead of Strobe.

Output:

Out N: Index (slider number) of probability hit.

Input:

Strb (Chng): Strobe (change) produces new probability output.


Corruption

Produces a controlled degradation of the original Value parameter input stream calculated by adding to, or substituting with, an offset (Ofst) according to the (Prob) probability input.

The idea for the module comes from an article on using information theory in algorithmic music originally published in the Leonardo Music Journal by algorithmic composer Laurie Spiegel, titled: An Information Theory Based Compositional Model.

This module has a user settable number of outputs. To change the number of outputs, click on the blue-label property button on the upper right of the module, and click on the "More" or "Fewer" button on the Outputs tab. You have the option to set custom input labels and tool tips if you like.

You also have the option, by checking the box at the bottom of the property dialog, of setting the module to produce a new value on Change instead of Strobe.

Output:

Out N: Corrupted version of Value input.

Input:

Strb (Chng): Strobe (change) produces new corruption output.

Value: Input stream to be corrupted.

Prob: Probability (0 - 100) that input will be corrupted. Use a probability value of 0 (never) to 100 (always), to select the likelihood that the original input will be changed. The source for this value might be a simple sequence parallel to the input sequence, or perhaps some calculation based on the input such as inverse MIDI Velocity to degrade the quieter values more than the louder ones.

Ofst: Value added or substituted on corruption hit. Offset values would be chosen according to the intended use of the output. For example, if the output was to be used for pitch, the values might be set up as intervals going from harmonic to dissonant; if the output was program change, the values could be moving increasingly away from the original instrument's tonal color.

Subst: NZ to substitute Ofst for Value, 0 to add to Value.


Feedback

Additive feedback from input+output to output.

Output:

Out: Feedback count.

Inputs:

Incr: Amount to add to output.

Wrap: 0 = stop when limits reached; >0 = wrap around; <0 = oscillate.

High: High Limit.

Low: Low Limit.

Start: Start value, sent to output on Reset.

Reset: NZ = reset to Start value.

Chng: A changing positive value or static negative value to process next step. If a negative value is given, processing occurs at maximum loop speed.


FuncGen

Generate points for Sine, 2x Cosine, Triangle, Sawtooth waveforms. Emulates a LFO (Low Frequency Oscillator).

Outputs:

Out X: Step Output.

Out Y: Value Output.

Inputs:

Chng: Any change to process next step.

Func: 0=Sine, 1=2Cos, 2=Tri, 3=Ramp, 4=Saw.

MaxX: Maximum X for full cycle.

MaxY: Maximum Y for full range.

Invrt: NZ=Invert Y Output.

Rot90: NZ=Rotate 90 degrees (swaps X and Y outputs).

Int: NZ = Force outputs to integers.

Reset: NZ = Reset to start of cycle & hold.


Lissajous

Generate Lissajous X,Y oscilloscope patterns.

Output:

Out X: Lissajous X Output.

Out Y: Lissajous Y Output.

Step: Value Output.

Input:

Chng: Any change to process next step.

MaxX: Maximum X range.

MaxY: Maximum Y range.

LisX: Lissajous fold value X.

LisY: Lissajous fold value Y.

AScl: Angle Scale.

RScl: Radius Scale.

Steps: Steps for a complete Lissajous cycle.

Int: NZ = Force outputs to integers.

Reset: NZ = Reset to start of cycle & hold.

MusicWonk is Copyright © 2003-2007 by John Dunn and Algorithmic Arts. All Rights Reserved