Type chooses the datatype on value. Number and Integer fall between Minimum and Maximum, Boolean is true or false, String is Length characters from the node's alphabet, Colour is #rrggbb text and Choice picks one of the node's listed strings.
Without a seed cable each draw is unpredictable. With a seed cabled in, the sequence is a function of the seed and the draw count, so the same seed gives the same values every time the Toy starts.
During replay Random does not draw again: the values it sent while the take was recorded are played back.
Number, Integer, Boolean, String, Colour or Choice. The value port takes this datatype, so a cable from it must fit: a colour feeds a lamp, a number feeds Data to control.
Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.
1. Colours and numbers
beginner Teaches: type, min, max
One Random node picks a colour for a lamp; another picks a number that moves a filter.
Cron
Enable1 lane
Tick1 lane
Time1 lane
Interval fires every few seconds, Cron follows the expression in the host time zone, Beat follows the transport. Range: 0–2. Default: 0. Linear scale. Units: unitless.
Seconds between ticks in Interval mode. Range: 0.05–3600 s. Default: 1 s. Logarithmic scale. Units: s.
s
Note value between ticks in Beat mode. Range: 0–5. Default: 2. Linear scale. Units: unitless.
Stop after this many ticks; 0 runs until stopped. Range: 0–100000. Default: 0. Linear scale. Units: unitless.
Random
Trigger1 lane
Seed1 lane
Value1 lane
Datatype of the value; Choice picks one of the listed strings. Range: 0–5. Default: 0. Linear scale. Units: unitless.
Smallest number or integer. Range: -1000000–1000000. Default: 0. Linear scale. Units: unitless.
Largest number or integer. Range: -1000000–1000000. Default: 1. Linear scale. Units: unitless.
Characters in a random string. Range: 1–64. Default: 8. Linear scale. Units: unitless.
Uniform spreads values evenly; Normal clusters them around the middle of the range. Range: 0–1. Default: 0. Linear scale. Units: unitless.
Random
Trigger1 lane
Seed1 lane
Value1 lane
Datatype of the value; Choice picks one of the listed strings. Range: 0–5. Default: 0. Linear scale. Units: unitless.
Smallest number or integer. Range: -1000000–1000000. Default: 0. Linear scale. Units: unitless.
Largest number or integer. Range: -1000000–1000000. Default: 1. Linear scale. Units: unitless.
Characters in a random string. Range: 1–64. Default: 8. Linear scale. Units: unitless.
Uniform spreads values evenly; Normal clusters them around the middle of the range. Range: 0–1. Default: 0. Linear scale. Units: unitless.
Data to control
Value1 lane
Control1 lane
Value mapped to 0 on the control lane. Range: -1000000–1000000. Default: 0. Linear scale. Units: unitless.
Value mapped to 1 on the control lane. Range: -1000000–1000000. Default: 1. Linear scale. Units: unitless.
Keep the lane inside 0–1 when the value leaves the range. Range: 0–1. Default: 1. Linear scale. Units: unitless.
Oscillator
MIDI1 lane
Audio2ch
Fundamental pitch, capped below Nyquist; detune uses cents. Range: 20–20000 Hz. Default: 220 Hz. Logarithmic scale. Units: Hz.
Hz
Output gain. Range: 0–0.5 ×. Default: 0.12 ×. Linear scale. Units: linear gain.
×
Selects the implemented algorithm. Choices are discrete and are not LFO targets. Range: 0–7. Default: 0. Linear scale. Units: unitless.
Cycle offset; Gate rising edges restart phase from this position. Range: 0–1 cycles. Default: 0 cycles. Linear scale. Units: cycles.
cycles
Pitch offset in cents. Range: -1200–1200 cents. Default: 0 cents. Linear scale. Units: cents.
cents
On or off. A rising edge retriggers; held on runs the oscillator or envelope. A control cable switches it at 0.5. Range: 0–1. Default: 1. Linear scale. Units: unitless.
Semitones a full pitch bend on the MIDI input moves the note, up or down. Range: 0–48 st. Default: 2 st. Linear scale. Units: st.
st
Time constant of the slide from one MIDI note's pitch to the next; 0 jumps. Range: 0–2000 ms. Default: 0 ms. Linear scale. Units: ms.
ms
Filter
Audio2ch
Audio2ch
Filter cutoff, capped at 0.45 times sample rate. Range: 20–20000 Hz. Default: 1200 Hz. Logarithmic scale. Units: Hz.
Selects the implemented algorithm. Choices are discrete and are not LFO targets. Range: 0–5. Default: 1. Linear scale. Units: unitless.
One or two cascaded state-variable stages; notch/all-pass retain their response semantics. Range: 0–1. Default: 0. Linear scale. Units: unitless.
Reduces resonant gain as Q increases. Range: 0–1. Default: 0. Linear scale. Units: unitless.
Audio output
Audio2ch
Note
Note
Patch: Oscillator audio output connected to Filter audio input. Filter audio output connected to Patch outputs audio input. Data to control control output connected to Filter @cutoff input. Cron tick output connected to Random “colour” trigger input. Cron tick output connected to Random “amount” trigger input. Random “amount” value output connected to Data to control value input.Connections as text
Oscillator audio output connected to Filter audio input
Filter audio output connected to Patch outputs audio input
Data to control control output connected to Filter @cutoff input
Cron tick output connected to Random “colour” trigger input
Cron tick output connected to Random “amount” trigger input
Random “amount” value output connected to Data to control value input
Type Colour sends #rrggbb text; Type Number sends a number between Minimum and Maximum.
Data to control maps 0–1 onto the cutoff lane.
Frame preview (static). Controls show their default values.
A wired seed makes Random repeat the same sequence of choices every time the Toy starts.
Cron
Enable1 lane
Tick1 lane
Time1 lane
Interval fires every few seconds, Cron follows the expression in the host time zone, Beat follows the transport. Range: 0–2. Default: 0. Linear scale. Units: unitless.
Seconds between ticks in Interval mode. Range: 0.05–3600 s. Default: 1 s. Logarithmic scale. Units: s.
s
Note value between ticks in Beat mode. Range: 0–5. Default: 2. Linear scale. Units: unitless.
Stop after this many ticks; 0 runs until stopped. Range: 0–100000. Default: 0. Linear scale. Units: unitless.
Value
Send1 lane
Value1 lane
Datatype of the stored value; Text and JSON read the text data key. Range: 0–3. Default: 0. Linear scale. Units: unitless.
The value when Kind is Number; non-zero is true for Boolean. Range: -1000000000–1000000000. Default: 0. Linear scale. Units: unitless.
Convert
Value1 lane
Value1 lane
Error1 lane
Datatype of the converted value. Range: 0–6. Default: 0. Linear scale. Units: unitless.
Random
Trigger1 lane
Seed1 lane
Value1 lane
Datatype of the value; Choice picks one of the listed strings. Range: 0–5. Default: 0. Linear scale. Units: unitless.
Smallest number or integer. Range: -1000000–1000000. Default: 0. Linear scale. Units: unitless.
Largest number or integer. Range: -1000000–1000000. Default: 1. Linear scale. Units: unitless.
Characters in a random string. Range: 1–64. Default: 8. Linear scale. Units: unitless.
Uniform spreads values evenly; Normal clusters them around the middle of the range. Range: 0–1. Default: 0. Linear scale. Units: unitless.
Console log
Value1 lane
Trigger1 lane
Severity shown in the Console and used by file sinks. Range: 0–3. Default: 1. Linear scale. Units: unitless.
Most lines written per second; extra values are counted, not logged. Range: 1–1000 /s. Default: 20 /s. Linear scale. Units: /s.
/s
Audio output
Note
Note
Patch: Cron tick output connected to Random trigger input. Value value output connected to Convert value input. Random value output connected to Console log value input. Convert value output connected to Random seed input.Connections as text
Cron tick output connected to Random trigger input
Value value output connected to Convert value input
Random value output connected to Console log value input
Convert value output connected to Random seed input
Choice picks one of the listed strings; String would use Length characters from the alphabet.
A cabled seed makes the sequence a function of seed and count.
Frame preview (static). Controls show their default values.