The node measures the input's pitch every 5–6 ms with the YIN method, searching between Lowest note and Highest note. Steady tones are measured to well inside a cent. Silence, noise and other sounds without a clear pitch keep the last correction.
The target is the nearest note of the Toy's tuning, the same tuning its instruments play, so it follows 19-EDO, just intonation or a custom scale. In a 12-degree tuning, Scale and Key limit the targets to the notes of a scale. When notes are held on the midi input, the nearest held note is the target instead. A target changes only when another note is clearly nearer, so a voice sitting between two notes does not flutter.
Retune sets how quickly the correction reaches a new target, and Amount how much of the distance it corrects. The correction drives the same splicing shifter as the Pitch shifter, with a fixed 40 ms window. Every channel of the cable is corrected together from the pitch of all channels mixed.
The node delays everything by 20 ms, and the Patch aligns parallel paths around it. At Amount 0 it is an exact delay.
Use it to tighten a sung or played line, for the hard snapped effect at Retune 0, to force a melody into a scale, or with held MIDI notes to play a voice's pitch from a keyboard. It expects one note at a time; chords and drums have no single pitch to correct.
Time the correction takes to reach a new target; 0 snaps at once.
amount
Amount
0 to 1
1
linear
Fraction of the distance to the target that is corrected.
scale
Scale
0 to 6
0
linear
Notes the correction may target. Tuning allows every note of the Toy tuning; the scales apply to 12-degree tunings and allow every note otherwise. Held MIDI notes override it. Choices: 0 Tuning, 1 Major, 2 Minor, 3 Pentatonic major, 4 Pentatonic minor, 5 Blues, 6 Chromatic.
key
Key
0 to 11
0
linear
Tonic of the scale. Choices: 0 C, 1 C♯, 2 D, 3 D♯, 4 E, 5 F, 6 F♯, 7 G, 8 G♯, 9 A, 10 A♯, 11 B. Shown when scale is 1 or 2 or 3 or 4 or 5.
low_hz
Lowest note
50 to 1000
70
Hz
log
Lowest pitch the detector looks for.
high_hz
Highest note
100 to 2000
1000
Hz
log
Highest pitch the detector looks for.
mix
Mix
0 to 1
1
linear
Dry/wet blend. The dry signal is delayed by the same latency before blending.
The time the correction takes to cover 99% of a change in target, 0 to 500 ms. 0 snaps at once for the robotic effect; 20–60 ms is tight but smooth; 100 ms and up lets vibrato and slides through.
The notes the correction may target. Tuning allows every note of the Toy tuning. Major, Minor, Pentatonic major, Pentatonic minor, Blues and Chromatic apply in 12-degree tunings such as 12-TET, just or Pythagorean; in other tunings they allow every note. Held MIDI notes override the scale.
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. Correct a drifting tone
beginner Teaches: retune_ms, amount, mix
A sine that slides between G♯4 and B4, pulled onto the nearest notes.
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: 1 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.
Scale
ControlAuto
ControlAuto
Input value that maps to Output min. Range: -10000–10000. Default: 0. Linear scale. Units: unitless.
Input value that maps to Output max. Range: -10000–10000. Default: 1. Linear scale. Units: unitless.
Output at Input min. Range: -10000–10000. Default: 0. Linear scale. Units: unitless.
Output at Input max. Range: -10000–10000. Default: 1. Linear scale. Units: unitless.
Bend of the mapping: negative eases in, positive eases out, 0 is linear. Range: -1–1. Default: 0. Linear scale. Units: unitless.
Hold the output inside its range instead of extrapolating. 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
Pitch correction
Audio2ch
MIDI1 lane
Audio2ch
Time the correction takes to reach a new target; 0 snaps at once. Range: 0–500 ms. Default: 40 ms. Linear scale. Units: ms.
ms
Fraction of the distance to the target that is corrected. Range: 0–1. Default: 1. Linear scale. Units: unitless.
Notes the correction may target. Tuning allows every note of the Toy tuning; the scales apply to 12-degree tunings and allow every note otherwise. Held MIDI notes override it. Range: 0–6. Default: 0. Linear scale. Units: unitless.
Lowest pitch the detector looks for. Range: 50–1000 Hz. Default: 70 Hz. Logarithmic scale. Units: Hz.
Hz
Highest pitch the detector looks for. Range: 100–2000 Hz. Default: 1000 Hz. Logarithmic scale. Units: Hz.
Hz
Dry/wet blend. The dry signal is delayed by the same latency before blending. Range: 0–1. Default: 1. Linear scale. Units: unitless.
Audio output
Audio2ch
Note
Note
Note
Patch: Control LFO control output connected to Scale control input. Scale control output connected to Oscillator @frequency input. Oscillator audio output connected to Pitch correction audio input. Pitch correction audio output connected to Patch outputs audio input.Connections as text
Control LFO control output connected to Scale control input
Scale control output connected to Oscillator @frequency input
Oscillator audio output connected to Pitch correction audio input
Pitch correction audio output connected to Patch outputs audio input
The LFO slowly slides the sine between G♯4 and B4, so there is something to correct.
Retune 0 jumps from note to note. Slower settings glide between notes; 100 ms and up sounds natural.
Amount below 1 corrects only part of the way. Mix 0.5 plays the original and the corrected tone together.
Frame preview (static). Controls show their default values.
A saw sweeping an octave lands only on the notes of the chosen scale.
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: 1 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.
Scale
ControlAuto
ControlAuto
Input value that maps to Output min. Range: -10000–10000. Default: 0. Linear scale. Units: unitless.
Input value that maps to Output max. Range: -10000–10000. Default: 1. Linear scale. Units: unitless.
Output at Input min. Range: -10000–10000. Default: 0. Linear scale. Units: unitless.
Output at Input max. Range: -10000–10000. Default: 1. Linear scale. Units: unitless.
Bend of the mapping: negative eases in, positive eases out, 0 is linear. Range: -1–1. Default: 0. Linear scale. Units: unitless.
Hold the output inside its range instead of extrapolating. 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
Pitch correction
Audio2ch
MIDI1 lane
Audio2ch
Time the correction takes to reach a new target; 0 snaps at once. Range: 0–500 ms. Default: 40 ms. Linear scale. Units: ms.
ms
Fraction of the distance to the target that is corrected. Range: 0–1. Default: 1. Linear scale. Units: unitless.
Notes the correction may target. Tuning allows every note of the Toy tuning; the scales apply to 12-degree tunings and allow every note otherwise. Held MIDI notes override it. Range: 0–6. Default: 1. Linear scale. Units: unitless.
Tonic of the scale. Range: 0–11. Default: 0. Linear scale. Units: unitless.
Lowest pitch the detector looks for. Range: 50–1000 Hz. Default: 100 Hz. Logarithmic scale. Units: Hz.
Hz
Highest pitch the detector looks for. Range: 100–2000 Hz. Default: 600 Hz. Logarithmic scale. Units: Hz.
Hz
Dry/wet blend. The dry signal is delayed by the same latency before blending. Range: 0–1. Default: 1. Linear scale. Units: unitless.
Audio output
Audio2ch
Note
Note
Note
Patch: Control LFO control output connected to Scale control input. Scale control output connected to Oscillator @frequency input. Oscillator audio output connected to Pitch correction audio input. Pitch correction audio output connected to Patch outputs audio input.Connections as text
Control LFO control output connected to Scale control input
Scale control output connected to Oscillator @frequency input
Oscillator audio output connected to Pitch correction audio input
Pitch correction audio output connected to Patch outputs audio input
A triangle LFO sweeps the saw from A3 to A4 and back over 20 seconds.
Major in C plays a C major scale as the sweep passes; Pentatonic minor or Blues leave out more notes. Tuning allows every note of the Toy tuning.
Lowest note and Highest note bound the detector. Keep them around the sound to avoid octave mistakes.
Frame preview (static). Controls show their default values.
Held keys become the only targets; release them to return to the Toy tuning.
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: 1 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.
Scale
ControlAuto
ControlAuto
Input value that maps to Output min. Range: -10000–10000. Default: 0. Linear scale. Units: unitless.
Input value that maps to Output max. Range: -10000–10000. Default: 1. Linear scale. Units: unitless.
Output at Input min. Range: -10000–10000. Default: 0. Linear scale. Units: unitless.
Output at Input max. Range: -10000–10000. Default: 1. Linear scale. Units: unitless.
Bend of the mapping: negative eases in, positive eases out, 0 is linear. Range: -1–1. Default: 0. Linear scale. Units: unitless.
Hold the output inside its range instead of extrapolating. 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
Keyboard
MIDI1 lane
Pitch correction
Audio2ch
MIDI1 lane
Audio2ch
Time the correction takes to reach a new target; 0 snaps at once. Range: 0–500 ms. Default: 60 ms. Linear scale. Units: ms.
ms
Fraction of the distance to the target that is corrected. Range: 0–1. Default: 1. Linear scale. Units: unitless.
Notes the correction may target. Tuning allows every note of the Toy tuning; the scales apply to 12-degree tunings and allow every note otherwise. Held MIDI notes override it. Range: 0–6. Default: 0. Linear scale. Units: unitless.
Lowest pitch the detector looks for. Range: 50–1000 Hz. Default: 70 Hz. Logarithmic scale. Units: Hz.
Hz
Highest pitch the detector looks for. Range: 100–2000 Hz. Default: 1000 Hz. Logarithmic scale. Units: Hz.
Hz
Dry/wet blend. The dry signal is delayed by the same latency before blending. Range: 0–1. Default: 1. Linear scale. Units: unitless.
Audio output
Audio2ch
Note
Note
Patch: Control LFO control output connected to Scale control input. Scale control output connected to Oscillator @frequency input. Oscillator audio output connected to Pitch correction audio input. Keyboard midi output connected to Pitch correction midi input. Pitch correction audio output connected to Patch outputs audio input.Connections as text
Control LFO control output connected to Scale control input
Scale control output connected to Oscillator @frequency input
Oscillator audio output connected to Pitch correction audio input
Keyboard midi output connected to Pitch correction midi input
Pitch correction audio output connected to Patch outputs audio input
The saw drifts between B3 and F♯4.
Hold a chord on the keys: the tone jumps to whichever held note is nearest. Release every key to fall back to the nearest note of the Toy tuning.
Frame preview (static). Controls show their default values.