Guide

How Fredon hears your voice and finds the chord

A voice sings one note at a time: you can't sing a chord. So Fredon does two separate things. It recognizes the note you sing or whistle, then picks the chord that goes with it, using the key. And when you strum a chord on your instrument, it hears it directly. Here's how it works, without the unnecessary jargon.

What the mic actually hears

A note is a vibration that repeats. The A of a tuning fork vibrates 440 times per second: 440 hertz. An octave higher, the frequency doubles: 880 hertz. In between are twelve half steps, each about 6% higher than the one before.

But a voice never produces just one frequency. When you sing an A, you put out 440 hertz plus, on top of it, harmonics at 880, 1,320, 1,760 hertz… Their blend is what gives a voice its tone: the same note sung by two people doesn't have the same color. Whistling is the opposite: almost a single frequency, very pure. The whole job is to find, under that blend, the base frequency, the fundamental. That's what gives the note its name.

WHISTLEVOICE1 PERIOD
The same note, whistled and then sung. The whistle is an almost pure sine wave; the voice draws a more complex shape, but one that repeats at the same rate: that period is what gives the note.

Finding the note, hundreds of times a second

Fredon listens to the mic in small slices of about 85 milliseconds, and starts over roughly every 5 milliseconds. For each slice, it first asks what it's hearing: silence or noise, a voice, or a whistle. Three clues are enough: the volume, whether the spectrum looks like noise or a sustained tone, and how much of the energy is concentrated on a single frequency.

That sorting matters, because the right method isn't the same for each:

  • For a whistle, Fredon breaks the sound down into frequencies (a Fourier transform) and takes the highest peak. Since a whistle is almost pure, that peak is the note, with great precision.
  • For a voice, that method would often get it wrong, because a harmonic can be stronger than the fundamental. Instead, Fredon compares the signal with itself, shifted in time, and looks for the shift where it matches itself best. That shift is the length of one vibration: the period, and therefore the note.
WHISTLE440880132017602200HZVOICE440880132017602200HZNOTE
The spectrum of the same note. The whistle has just one peak. The voice lines up harmonics at 2, 3 and 4 times the base frequency, and here the second one is stronger than the note itself: taking the highest peak would land an octave too high.
SHIFTED BY ONE PERIOD: THE TWO CURVES LINE UP
The voice compared with itself. Shifted by exactly one period, the copy (dotted) lines up with the original: that shift is what Fredon looks for.

The classic trap with these methods is the octave: mistaking a note for the one above or below. Fredon guards against it: an octave jump that lasts only an instant, or that comes with a drop in confidence, is treated as a measurement error, not as a sung note.

A note that doesn't flicker on screen

Your voice is never perfectly steady: it drifts up a little, back down, wavers with vibrato. Showing every raw measurement would make the display flicker. Fredon keeps the median of the latest measurements, and only changes the displayed note if you clearly cross the boundary with the next one, by 40 cents, for at least 60 milliseconds. A cent is one hundredth of a half step.

GG♯ARAW PITCHDISPLAYED NOTE
A voice singing G with vibrato, then sliding up to A. The raw pitch wobbles; the displayed note stays on G, then switches cleanly to A once the boundary is clearly crossed.

That's also what drives the pitch meter: the gap in cents between what you're singing and the nearest in-tune note. The reference pitch is adjustable, in case you're playing with an instrument tuned slightly above or below 440 hertz. Fredon's tuner uses exactly the same engine, applied to an open string.

From note to chord: the key

A note belongs to several chords. A G is part of the G chord, but also of C and Em. Which one to choose? The one that sounds most natural in the key of what you're singing.

Three chords that contain the note G. In a song in G major, they all sound right, each with a different color.

To find the key, Fredon keeps a tally of the notes you've sung, weighted by how long they last: a held note counts more than a passing one. It compares that profile with those of the 24 keys, major and minor. Each key has its own signature: in C major, C, E and G come up constantly, and C♯ almost never. These reference profiles come from research in music psychology that measured which notes listeners hear as "belonging" in each key (the Krumhansl-Kessler and Temperley profiles). The key that looks most like your singing wins.

CC♯DD♯EFF♯GG♯AA♯BG MAJOR SCALE
The sung notes, weighted by duration. The seven notes of the G major scale dominate, with an F♯ and no F: the melody is in G major.

Fredon then suggests the most natural chord for the sung note in that key, with a few alternatives alongside. You can also set the key yourself. The guide on how to find the key of a song explains how to do it by ear.

Harmonizing a whole tune

When you record a full melody, the problem changes: it's no longer about choosing one chord, but a sequence of chords that flow well together. Fredon first transcribes the notes, then looks for the best path through the chords, the way a GPS looks for the best route.

Every choice has a "cost." A chord that doesn't contain the main note of the moment costs a lot. A brief note outside the chord costs little: it's a passing note, and the ear is fine with it. The moves tonal music loves, from the tonic to the subdominant, then the dominant, then back to the tonic, are favored. Phrase endings call for a cadence, which sounds like punctuation. A classic algorithm (Viterbi) finds the lowest-cost path among all possible combinations, and keeps the runners-up too: that's why Fredon can offer other harmonizations of the same tune.

MELODYGBAGCBAGGCDE MINMOST NATURAL CHORD PATH, CHOSEN ACROSS THE WHOLE PHRASE
For each note, several chords are possible. Fredon picks the most natural path across the whole phrase, not note by note: here G, D, Em, C, then back to G.

To dig deeper on the music side, see how to write a song without playing an instrument.

Recognizing a strummed chord

A strummed chord is several notes at once, each with its own harmonics. The voice method no longer works: there's no single period to find. So Fredon takes a longer slice of sound, about 170 milliseconds, around twenty times a second. More time means more precision in the low end, where a guitar's strings sit close together in frequency.

It breaks the sound down into frequencies and sorts each peak into one of the twelve notes of the scale, regardless of octave. The result is a "chroma": twelve bars that show how strongly each note is present. One precaution is essential: the low E string also produces, through its harmonics, a B and a G♯. Without a correction, a single string would pass for an E major chord. So Fredon turns down peaks that land exactly on a harmonic of a lower, stronger note.

UNCORRECTEDEG♯BCORRECTEDEG♯B
A low E string played alone. Without correction, its harmonics bring up B and G♯, as in an E major chord. Once the harmonics are turned down, only E remains: no chord is displayed by mistake.

It then compares those twelve bars with chord templates: major, minor, seventh, major seventh, minor seventh, sus2, sus4 and diminished, on each of the twelve roots. It takes at least three different notes, and the same result twice in a row, for a chord to be displayed: a stray sound or a harmonic isn't enough to fool it.

When you practice a specific chord, Fredon also compares what it hears with what it expects. If a note is missing, it finds the strings in the displayed fingering that should have played it, and tells you which ones to check.

Everything happens on your phone

None of these calculations go out to the internet. Your phone does it all, on a separate processing thread so the display stays smooth. So there's no network lag, the app works offline, and your voice never leaves your device. The demo on this site works the same way, right in your browser.

Getting heard clearly

  • Hold the note for half a second, without heavy vibrato at the start.
  • Stay about a foot away from the mic: too close, and the sound distorts.
  • Try whistling: it's the easiest sound to recognize.
  • Strum firmly and let the strings ring so the chord gets recognized.
  • Avoid background noise: a TV or a conversation muddies the measurement.

← All guides