Pitch Detect

Detect the pitch and frequency of an audio signal.

What it does

Pitch Detect reports the fundamental frequency of an audio signal, the note being played or sung. Outputs are the frequency in Hz, the equivalent MIDI note number (fractional for out-of-tune notes), a readable note name such as A4, and a confidence value. A passthrough copy of the buffer is also available for keeping the signal moving downstream.

It works on one voice at a time, so feed it a single instrument or vocal line. Min Frequency and Max Frequency narrow the search range to the notes expected, which improves both accuracy and response time.

When to use it

ParameterTypeDefault
audio_inOneOf([Signal, NumberArray])
min_freqNumber50
max_freqNumber2000
thresholdNumber0.150
smoothingNumber20
sample_rateNumber0

Gotchas

Pitch Detect is monophonic and finds one fundamental frequency at a time. Chords and polyphonic material produce unstable or misleading readings.

Threshold trades sensitivity for reliability. Lower values catch quieter or weaker pitches and are more prone to false positives; raise it when noisy input produces spurious note changes.

Lowering Min Frequency to track deep bass notes needs a larger analysis window, which adds latency before a detection appears. Go only as low as the lowest note expected.

Audio In needs sample-rate information to measure frequency correctly. Set Sample Rate manually when the source does not carry it. Leaving it at 0 works only when the input already knows its own rate.

Worked example

  1. Add a Pitch Detect node and wire an audio source into Audio In.

  2. Set Min Frequency and Max Frequency to bracket the range of notes expected. Narrower is faster and more accurate.

  3. Watch Frequency and Note Name update live. Raise Smoothing if the readout jitters between notes, or lower it toward 0 for instant response.

  4. Use Confidence to ignore detections during silence or noise, acting on the pitch only when confidence is high.

See also

Audio Analysis · Envelope Follower · Piano Roll · Numbers, signals & audio