Each time a new value is due, Random decides with Probability whether to change at all, then picks the value. In Step mode the lane jumps to a new value between 0 and 1; in Smooth mode it glides there over Slew; in Walk mode it moves from where it is by at most Walk either way and stays inside 0 to 1. Min and Max then map that 0 to 1 value onto the range the output uses, and may be swapped to invert it.
When a cable reaches Trigger, each rising edge is a new value. When nothing does, Random runs at Rate, or at one value per Beats when Beats is above 0, locked to the shared transport.
The sequence is seeded from the node's path, so the same Toy produces the same values on every host, every play and every replay. Two Random nodes in one Toy differ because their paths differ. Changing Probability does not shift the sequence that follows.
Use it for sample-and-hold style stepped values, a drifting pitch, humanised timing or levels, and generative patches. For random shapes inside a cycle, see the Random step and Random smooth shapes of Control LFO; to freeze any lane on a clock use Sample and hold.
How often a new value is due when Trigger is not cabled. Beats above 0 follows the transport and Rate is ignored. Control runs once per audio block, so at most one new value arrives per block.
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. Wander
beginner Teaches: mode, rate_hz, slew_ms
A free-running smooth random lane glides the pitch of a tone between new values.
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
Gain
Audio2ch
Audio2ch
Multiplies every audio channel. 0 silences the signal; 1 leaves its level unchanged. Range: 0–2 ×. Default: 1 ×. Linear scale. Units: linear gain.
×
Random
Trigger1 lane
Control1 lane
Step jumps to a new value, Smooth glides to it, Walk moves a bounded step from the current value. Range: 0–2. Default: 1. Linear scale. Units: unitless.
New values per second when nothing is cabled to Trigger and Beats is 0. Range: 0.01–40 Hz. Default: 1.5 Hz. Logarithmic scale. Units: Hz.
Hz
Beats per new value, synced to the shared transport, when nothing is cabled to Trigger. 0 uses Rate instead. Range: 0–64 beats. Default: 0 beats. Linear scale. Units: beats.
beats
Chance that a trigger changes the value. Range: 0–1. Default: 1. Linear scale. Units: unitless.
Largest step either way in Walk mode. Range: 0–1. Default: 0.2. Linear scale. Units: unitless.
Glide time in Smooth mode. Range: 0–10000 ms. Default: 300 ms. Linear scale. Units: ms.
ms
Output when the internal value is 0. Range: 0–1. Default: 0. Linear scale. Units: unitless.
Output when the internal value is 1. Range: 0–1. Default: 1. Linear scale. Units: unitless.
Audio output
Audio2ch
Note
Note
Patch: Oscillator audio output connected to Gain audio input. Gain audio output connected to Patch outputs audio input. Random control output connected to Oscillator @frequency input.Connections as text
Oscillator audio output connected to Gain audio input
Gain audio output connected to Patch outputs audio input
Random control output connected to Oscillator @frequency input
Min and Max map the 0 to 1 draw onto the range you want.
The sequence is seeded from the node path: the same on every play.
Frame preview (static). Controls show their default values.
A square clock triggers Random in Walk mode, and Probability decides how often the pitch moves.
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
Gain
Audio2ch
Audio2ch
Multiplies every audio channel. 0 silences the signal; 1 leaves its level unchanged. Range: 0–2 ×. Default: 1 ×. Linear scale. Units: linear gain.
×
Control LFO
Reset1 lane
Control1 lane
Cycle1 lane
Waveform of the oscillator. The random shapes draw a new value each cycle from a generator seeded by the node path, so every host and replay agrees. Range: 0–5. Default: 0. Linear scale. Units: unitless.
Cycles per second when Beats is 0. Range: 0.01–40 Hz. Default: 4 Hz. Logarithmic scale. Units: Hz.
Hz
Beats per cycle, synced to the shared transport. 0 uses Rate instead. Range: 0–64 beats. Default: 0 beats. Linear scale. Units: beats.
beats
Peak-to-peak amount of the output swing. Range: 0–1. Default: 1. Linear scale. Units: unitless.
Centre of the swing. Range: 0–1. Default: 0.5. Linear scale. Units: unitless.
Starting phase of the cycle, and where a Reset edge restarts it. Range: 0–1. Default: 0. Linear scale. Units: unitless.
Where the Triangle peaks, or how the Saw bends. 0.5 is the plain shape. Range: 0–1. Default: 0.5. Linear scale. Units: unitless.
Random
Trigger1 lane
Control1 lane
Step jumps to a new value, Smooth glides to it, Walk moves a bounded step from the current value. Range: 0–2. Default: 0. Linear scale. Units: unitless.
New values per second when nothing is cabled to Trigger and Beats is 0. Range: 0.01–40 Hz. Default: 2 Hz. Logarithmic scale. Units: Hz.
Hz
Beats per new value, synced to the shared transport, when nothing is cabled to Trigger. 0 uses Rate instead. Range: 0–64 beats. Default: 0 beats. Linear scale. Units: beats.
beats
Chance that a trigger changes the value. Range: 0–1. Default: 0.6. Linear scale. Units: unitless.
Largest step either way in Walk mode. Range: 0–1. Default: 0.25. Linear scale. Units: unitless.
Glide time in Smooth mode. Range: 0–10000 ms. Default: 100 ms. Linear scale. Units: ms.
ms
Output when the internal value is 0. Range: 0–1. Default: 0. Linear scale. Units: unitless.
Output when the internal value is 1. Range: 0–1. Default: 1. Linear scale. Units: unitless.
Audio output
Audio2ch
Note
Note
Patch: Oscillator audio output connected to Gain audio input. Gain audio output connected to Patch outputs audio input. Control LFO control output connected to Random trigger input. Random control output connected to Oscillator @frequency input.Connections as text
Oscillator audio output connected to Gain audio input
Gain audio output connected to Patch outputs audio input
Control LFO control output connected to Random trigger input
Random control output connected to Oscillator @frequency input
A cabled Trigger replaces the internal clock.
Walk stays inside 0 to 1, then Min and Max.
Frame preview (static). Controls show their default values.
Sample and hold Capture the input lanes whenever the trigger lane rises and hold them until the next trigger.
Control LFO A free-running or tempo-synced low-frequency oscillator on a control lane, 0 to 1, with depth, offset, phase, skew, random shapes and a reset input.
Counter Count rising edges of a trigger lane, with step, limit, wrap and reset. Lane 1 is the normalised count, lane 2 the raw count.
Scale Map a control range onto another with a curve, clamp and inversion. Depth and offset for any modulation.