Tuner

Passes audio through unchanged and shows the nearest degree of a microtonal tuning on its face. Mute silences it like a tuner pedal.

  • Utility
  • Since 0.2.0
  • tuner
  • pitch
  • microtonal
  • tuning
  • scala
  • edo
  • just intonation
  • utility

Open in TuneToys

Tuner as the Patch draws it, at default values: inlets on the left, outlets on the right.

A Tuner sits in an audio chain and shows how far the sound is from the nearest note, or degree, of a tuning. By default it measures against the Toy's tuning, the one the Toy's instruments play. It can also use its own: ordinary 12-tone equal temperament, five finer equal divisions, just intonation, Pythagorean tuning, Bohlen–Pierce or any scale you import from a Scala .scl file.

What it does#

Audio passes through bit for bit; the Tuner never changes the sound. Mute fades the output to silence over 5 ms and back, so you can tune on stage without the audience hearing it.

The Tuner estimates a single pitch from its input on the UI thread, away from the audio callback. It keeps reading while Mute silences the output. Choose a View:

  • Meter shows a large note and octave (or scale degree), measured hertz, signed cents, a needle and a strip of every degree across one period. Right of centre is sharp; left is flat. The ruler spans ±50 cents, or half the smallest step for tunings finer than 24-EDO, such as ±19.4 cents in 31-EDO.
  • Wheel places one tuning period around a circle, with degrees at their actual cents positions. Unequal scales have unequal gaps; Bohlen–Pierce fills a tritave rather than an octave. The needle shows measured pitch, the highlighted dot marks its nearest degree, and an arc shows the error. The outer strobe moves with measured frequency error, reverses for flat versus sharp, and stops at exact tuning.

Green means the measured pitch is within In tune ±; amber means flat or sharp. The cents readout always shows the measured error. Needle damping steadies the needle without changing that readout. Level gate rejects quiet input by RMS dBFS. Hold briefly preserves the last reading, dimmed and labelled Held, after pitch disappears; then the needle, arc and strobe clear. Uncertain estimates dim and show Unclear. These are monophonic displays: chords and noise may not give a reliable pitch.

Both views use the same tuning, controls and input measurement in Patch cards, the inspector and Frame widgets. Display settings never retune the audio.

When to use it#

Use it after a source to check its tuning: an Oscillator or a Polyphonic instrument voice. To hear or check a microtonal scale, choose its tuning and play notes near its degrees. One Tuner measures one pitch at a time; it does not transcribe chords.

Ports#

PortDirectionSignalLanes
audioInputAudioInferred from the cable
audioOutputAudioInferred from the cable

Parameters#

ParameterLabelRangeDefaultUnitScaleNotes
referenceReference400 to 480440HzlinearFrequency of A4 for the Tuner's own tunings. Equal divisions keep A4 on a degree; just, Pythagorean, Bohlen–Pierce and custom scales start at Root. Toy tuning uses the Toy's reference instead. Shown when tuning is 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9.
muteMute0 to 10linearOn fades the output to silence over 5 ms, like a tuner pedal; Off fades back to an exact pass-through. Choices: 0 Off, 1 On.
tuningTuning0 to 1010linearThe degrees the face measures against. Toy tuning follows the Toy's own tuning, the one its instruments play; Custom uses the node's cents table and period, such as an imported Scala scale. Choices: 0 12-TET, 1 19-EDO, 2 22-EDO, 3 24-EDO, 4 31-EDO, 5 53-EDO, 6 Just intonation, 7 Pythagorean, 8 Bohlen–Pierce, 9 Custom, 10 Toy tuning.
rootRoot0 to 110linearTonic pitch class of the Tuner's own just, Pythagorean, Bohlen–Pierce and custom scales, at its 12-TET pitch from Reference. 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 tuning is 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9.
viewView0 to 10linearMeter shows signed cents; Wheel places every degree at its true cents position and adds a measured-error strobe. Choices: 0 Meter, 1 Wheel.
toleranceIn tune ±1 to 255¢linearCents from a degree that count as in tune, capped at half the smallest scale step.
dampingNeedle damping0 to 0.950.75linearNeedle smoothing at a 60 Hz reference rate. Zero follows immediately; higher values settle more slowly. Raw note, Hz and cents stay measured.
hold_msHold100 to 3000600mslinearRetains a dimmed reading for this long after pitch is lost or falls below Level gate.
gate_dbLevel gate-70 to -20-46dBFSlinearMinimum RMS level for a new pitch reading. Below this, the last reading is held, then cleared.
  • cents: floats.
  • period: floats.

Reference (reference)#

The frequency of A4 for the Tuner's own tunings, from 400 to 480 Hz; 440 by default. With Tuning on Toy tuning it is hidden: the Toy's tuning sets the reference. In the equal divisions of the octave (12-TET to 53-EDO) A4 is always a degree, so the reference stays in tune. Drag the A4 point on the face sideways, or focus it and use the arrow keys or the wheel; Shift moves in tenths of a hertz.

Mute (mute)#

On fades the output to silence over 5 ms; Off fades back to an exact pass-through. A Toy that starts muted is silent from its first sample.

Tuning (tuning)#

The degrees the face measures against. Toy tuning, the default, follows the Toy's own tuning: the preset or custom table, Root and Reference its Polyphonic instrument voices play, or 12-TET at 440 Hz when the Toy declares none. The face's caption then starts with "Toy", such as Toy · 31-EDO · A = 440, and it has no Reference point to drag. Any other choice uses the Tuner's own Reference and Root:

TuningDegrees per periodNames
12-TET12 per octaveC, C♯, D … B with an octave number, A4
19-EDO … 53-EDO19, 22, 24, 31 or 53n\N steps from C, such as 14\19 (A)
Just intonation12, five-limit ratiosNote names from Root
Pythagorean12, a chain of pure 3/2Note names from Root
Bohlen–Pierce13 equal steps of 3:1n\13 from Root
CustomUp to 128, from node dataDegree numbers from Root, 0 is the root

Just intonation uses 1/1, 16/15, 9/8, 6/5, 5/4, 4/3, 45/32, 3/2, 8/5, 5/3, 9/5 and 15/8. Pythagorean uses 1/1, 256/243, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 128/81, 27/16, 16/9 and 243/128.

Custom reads the node's cents data (degrees in cents above the root, ascending, from 0, each up to 9600) and period data (one value in cents, 1200 for an octave and about 1901.955 for a tritave). The Import .scl… button under the face fills both from a Scala file and selects Custom, as one edit that a single Undo reverts. Files are at most 64 KiB with at most 128 pitches; a malformed line, or pitches that are not positive and ascending, is refused with the line number.

Root (root)#

The tonic pitch class, C to B, of the Tuner's own just, Pythagorean, Bohlen–Pierce and custom scales; hidden on Toy tuning, which brings its own root. The root sits at its 12-TET pitch from Reference, and the other degrees are measured from it. Equal divisions of the octave ignore it.

View (view), tolerance (tolerance), damping (damping), Hold (hold_ms) and Level gate (gate_db)#

View selects Meter or Wheel. In tune ± defaults to 5 cents and is capped at half the smallest scale step, so the tolerance cannot span neighbouring degrees. Needle damping defaults to 0.75 and uses elapsed time, so display refresh rate does not change its response. Hold defaults to 600 ms; Level gate defaults to −46 dBFS. All five controls belong to the Tuner and can be bound on a Frame like its other parameters.

Tips#

  • Keep Mute on while you tune a live instrument, then switch it off to play.
  • A just major third sounds 13.7 cents flatter than the 12-TET third: set Tuning to Just intonation with Root on the key and watch the needle centre on the pure interval.
  • 24-EDO adds quarter tones between the 12-TET notes; 31-EDO is close to quarter-comma meantone.
  • Leave Tuning on Toy tuning after an instrument, and the needle centres on every key the instrument plays, whatever the Toy's tuning.

See also#

Oscillator, Polyphonic instrument, Gain.

Help patches

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. Tune a tone in any tuning

beginner Teaches: reference, mute, tuning, root

A sine tone through a Tuner: sweep the tone and watch the needle against 12-TET, quarter tones or 31-EDO.

Patch: Oscillator audio output connected to Tuner audio input. Tuner audio output connected to Patch outputs audio input.
Connections as text
  • Oscillator audio output connected to Tuner audio input
  • Tuner audio output connected to Patch outputs audio input
  • Press play and watch the Tuner's face: 446 Hz is 23 cents sharp of A4 in 12-TET. Sweep Tone to bring the needle to the centre.
  • Switch Tuning to 24-EDO or 31-EDO: the strip shows the finer degrees and the same tone lands on a different one. The sound never changes.
  • Mute fades the output out, like a tuner pedal. The face reads the output, so it goes quiet too.
Frame preview: Tune a tone in any tuningFrame “Tune a tone in any tuning” with 6 elements: text heading, segmented Mute, knob Tone, knob Reference, segmented Root, segmented Tuning.TUNE A TONE IN ANY TUNINGOffOnMute446 HzTone440 HzReferenceCC♯DD♯EFF♯GG♯AA♯BRoot12-TET19-EDO22-EDO24-EDO31-EDO53-EDOJust into…Pythagore…Bohlen–Pi…CustomTuning
Frame preview (static). Controls show their default values.

Open in TuneToys

  • Oscillator Selected waveform kernels, continuous morphing, harmonic shapes and phase/gate control; an optional MIDI input plays notes in the Toy's tuning.
  • Polyphonic instrument Eight owned, velocity-sensitive oscillator voices with ADSR, sustain and MPE, played from a MIDI cable in the Toy's tuning.
  • Gain A clean stereo gain stage.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close