Frequency Labalexweber.org

Frequency Lab · an interactive explainer

This is what harmony looks like.

A single point of light, pushed sideways by the note C and up and down by the note G. G vibrates exactly three times for every two vibrations of C, so the point keeps returning to where it began and traces this loop, over and over. Scroll down to see why, and if you like, to hear it.

Sound is part of the experience, but everything here reads fine without it. Nothing plays until you turn it on, and the volume starts low.

X
C4 · 261.63 Hz
Y
G4 · 392.44 Hz
Ratio
3 : 2

01 Vibration

Every sound is something swinging

Before it's a note, a sound is a motion: a string, a speaker cone or a column of air moving back and forth, nudging the air next to it, which nudges the air next to that, all the way to your ear.

Fig. 1 · one vibrating point, and its position over time

Here is that motion slowed right down: a single point swinging left and right, once every second. One full trip, out to one side, across to the other and back to where it began, is called a cycle.

The line underneath is a chart recorder: it plots where the point was a moment ago, so the swing draws its own wave.

Count the cycles in one second and you have the frequency, measured in hertz (Hz). One cycle per second is 1 Hz; ten per second is 10 Hz.

With sound on, you hear a click every time the swing reaches the right-hand end.

Now speed it up. Below about 20 Hz you hear separate clicks, a rhythm you could tap along to. Somewhere above that your ear stops counting and starts hearing one continuous pitch. The motion didn't change character, only rate. The change happens in your hearing.

Perception The point where clicks fuse into a tone is fuzzy: roughly 20 to 30 per second, depending on the sound and the listener.

Some landmarks. Middle C on a piano vibrates about 261.6 times a second. The A above it is 440 Hz, the note orchestras tune to. Young, healthy ears hear from roughly 20 Hz up to 20,000 Hz, and the top end falls with age.

Phone and laptop speakers can't move enough air to reproduce low frequencies, so at the low end of the slider you mostly hear the clicks' higher overtones. Headphones help.

Takeaway Pitch is rate of vibration: swing faster, hear a higher note. Below about 20 swings a second we hear rhythm instead of pitch.

02 Ratios

Two notes, one rhythm

Play C together with the G above it and you get a perfect fifth, one of the most stable, settled-sounding pairs in music. Here is what the two vibrations are doing.

Fig. 2 · C and G, slowed down by the same amount

Here are C and G as two traces over time. Watch where their peaks line up: every time C completes 2 cycles, G completes exactly 3, and the pattern starts again.

That's a frequency ratio of 3 : 2. At full speed, C4 is 261.63 Hz and this G is 392.44 Hz, and 392.44 ÷ 261.63 = 1.5 exactly.

Strictly, that's the "just" G. A piano's G is a hair lower, at 392.00 Hz. Hold that thought until chapter 06.

Now let C push a dot left and right, and let G push the same dot up and down at the same time.

After 2 swings of C and 3 of G, both are back where they started at the same moment. So the dot arrives back at its starting point and retraces the same path: a closed loop. Any two frequencies in a whole-number ratio close up like this.

Physics The figure closes after one cycle of the frequency both notes share: here 261.63 ÷ 2 ≈ 130.8 Hz, so about 131 times a second at full speed.

Drag the speed control from slow motion up to full speed. In Rhythm mode, the clicks you hear keep the 3-against-2 pattern; past about 20 per second the two rhythms fuse into the two pitches of a fifth. The loop doesn't change, because the ratio doesn't.

In True pitch mode you hear the real C4 and G4 the whole time, while the picture stays slowed down.

Takeaway In a small whole-number ratio, two vibrations realign often. Drawn as a dot driven by both, that's a simple closed loop.

03 Intervals

Every interval from C, from simple to tangled

There are twelve steps from C up to the next C. Pair each one with C and you get an interval with its own ratio, and so its own figure. Sorted by how simple the ratio is, a pattern jumps out.

Why simple ratios tend to sound smooth

Real notes aren't single pure vibrations. A plucked or sung C also vibrates at 2, 3, 4, 5… times its frequency, quietly: its harmonics. When two notes are in a simple ratio, many of their harmonics land on exactly the same frequencies and reinforce each other, and the combined wave repeats quickly. In a tangled ratio, few harmonics coincide and many land close but not equal, which the ear hears as roughness (more on that in chapter 04).

Physics Coinciding harmonics and fast-repeating waveforms are measurable facts about the sound.

Perception That we hear them as smooth or rough is about how hearing works, and it varies between listeners.

A score, not a law

The cards are ordered by Tenney height, log2(p × q) for a ratio p : q in lowest terms. It is one simple, standard way to rank ratios, and it lines up well with the shapes. But it is only a model.

Culture Where the line between consonant and dissonant falls is partly learned. Some medieval European theorists listed the major third as a dissonance; later ones called it an "imperfect consonance", and today it is the backbone of most Western harmony. Context matters as much as the ratio: a tritone that sounds tense in a hymn sounds at home in jazz.

Which ratios? This table uses five-limit just intonation with a 45:32 tritone and a 9:5 minor seventh. Other tables use 64:45 for the tritone, 16:9 for the minor seventh, or 10:9 for the major second. The figures differ in detail; the simple-to-tangled order barely changes.

04 Beats & roughness

When two notes almost agree

Simple ratios realign often. So what happens when two notes are almost, but not quite, the same?

Fig. 4 · two pure tones and their sum

Two pure tones, 440 Hz and 442 Hz. They drift in and out of step. Where their peaks coincide they add up; a moment later one has slipped half a cycle behind and they cancel. The combined loudness swells and fades, twice a second.

That swelling is called beating, and its rate is simply the difference between the two frequencies: |f₁ − f₂|. 440 and 443 beat three times a second.

Physics Tuners use this. As two strings approach the same pitch the beats slow down, and when they stop, the strings match.

Pull the tones further apart and the beats come too fast to follow as a throb. Somewhere past about 15 a second they turn into a buzzy, grainy roughness.

Further still, the roughness smooths out and you hear two separate, clear notes.

Perception Roughly speaking, roughness is strongest when two tones sit a fraction of a critical band apart (a band of hearing about 100 Hz wide around A4) and fades once they're more than a band apart. That idea comes from Plomp and Levelt's 1965 experiments on tonal consonance; the exact boundaries depend on pitch and listener, so the zones above are drawn fuzzy on purpose.

This is the link back to intervals. Two notes with a tangled ratio have many pairs of harmonics sitting within beating or rough distance of each other. Simple ratios line their harmonics up exactly, and exact means no beats.

Takeaway Close tones beat at the difference of their frequencies. Slow beats sound like a throb, fast ones like roughness, and far enough apart you hear two notes.

05 Chords

Three notes, three dimensions

Add a third note and give it the third axis. The dot now moves through space, and a chord becomes a shape you can turn in your hands.

Fig. 5 · drag to turn, pinch or ctrl+scroll to zoom

C drives left and right, E drives up and down, G drives front and back. In just intonation a C major triad is in the proportion 4 : 5 : 6: for every 4 cycles of C, E makes 5 and G makes 6, and then all three line up again and the path repeats.

Look at the shadows. Each wall shows the figure for one pair of notes: the back wall is C with E (5 : 4, a major third), the floor is C with G (3 : 2, the fifth), the side wall is E with G (6 : 5, a minor third). A major triad is those three intervals at once.

A minor triad uses the same three intervals rearranged, but in just intonation its proportion is 10 : 12 : 15, bigger numbers, so it takes longer to repeat and its figure is busier. Compare the suspended chords, or build your own.

Culture "Busier" isn't "worse". Minor chords aren't heard as dissonant in most music; the shape only shows how often the three vibrations realign.

Switch to Live to see the figure at real audio speed. The dot moves far too fast to follow, and what's left is the shape it keeps retracing, the way an oscilloscope screen would show it.

Takeaway Three notes in a simple proportion trace a closed 3D path. Each of its shadows is the figure of one interval inside the chord.

06 Just vs. equal temperament

Why the shape never sits still

On a piano, the figures from the last chapters won't hold still. That isn't a flaw in the drawing; it's a compromise built into nearly every keyboard instrument.

Fig. 6 · the figure at real audio speed, with phosphor afterglow

Pick an interval and flip between just tuning (exact whole-number ratios) and equal temperament, the tuning of nearly every modern piano. In equal temperament every semitone has the same ratio, the twelfth root of two, ≈ 1.05946, so any interval is 2n/12 for n semitones.

In just tuning the figure closes and stands still. In equal temperament it never quite closes, so the shape rolls slowly through its variations. The roll rate is itself a beat rate: for an equal-tempered fifth on middle C, under once a second; for a major third, about ten times a second.

Physics That rate equals the beating between the harmonics that would coincide if the interval were just: for the fifth, C's 3rd harmonic against G's 2nd.

How far off are the piano's intervals? The fifth is only about 2 cents flat (a cent is a hundredth of a semitone), almost pure. The major third is about 14 cents sharp, which many people can hear as a gentle shimmer once it's pointed out.

So why temper at all? Because pure intervals don't fit together. Stack twelve pure fifths, C → G → D → …, and you should arrive back at a C seven octaves up. You don't: you overshoot by about 23.5 cents, the Pythagorean comma ((3/2)12 ÷ 27 ≈ 1.01364).

Equal temperament spreads that error evenly, shaving about 2 cents off every fifth, so the circle closes and every key works equally well. The price is that no interval except the octave is exactly pure.

* Reality is messier still. Real piano strings are slightly stiff, so their harmonics run a little sharp of exact multiples (inharmonicity). Tuners compensate by stretching octaves a touch wider than 2 : 1, most of all at the top and bottom of the keyboard.

Takeaway Pure ratios can't all fit on a twelve-note keyboard. Equal temperament makes every interval slightly impure, so its figures drift instead of standing still.

07 Sandbox

Your own oscilloscope

Free play. Set two or three oscillators to any frequency or ratio and watch the result two ways: as the mathematical figure, or on a true X–Y oscilloscope that plots the actual audio samples, left channel against right.

X–Y mode sends oscillator A to the left channel and B to the right, exactly what an oscilloscope wired to your headphone jack would see. Wearing headphones, each ear gets one oscillator.

Things to try: set an exact 3 : 2, then nudge B by 1 Hz and watch the figure roll once a second. Switch both to square waves. Turn on C for a third voice.

Microphone (optional): see a live spectrum and waveform of your voice, a whistle or an instrument. The audio is analysed only inside this tab; nothing is recorded or sent anywhere.

08 Further reading

Go deeper

A short, curated list for following any thread on this page further.

Figures & machines

  • Lissajous curveThe mathematics of the figures on this page, with a gallery of ratios and phases.
  • Jules Antoine LissajousThe 19th-century physicist who made them visible with mirrors on vibrating tuning forks.
  • HarmonographVictorian pendulum machines that draw the same figures in ink, with damping.

Harmonics & tuning

Hearing & consonance

Classic & practical