How to use it
The picture is made by two tones drawn against each other. The horizontal position of the dot follows the first tone, x, and the vertical position follows the second, y. Choose a ratio with the steppers or press a preset such as Fifth 3:2, and the figure appears at once. Press Turn sound on to hear the same two tones: x in the left ear, y in the right ear. You need headphones or two separate speakers to hear them apart; from one speaker they mix. Sound stays off until you press the button.
Live moves the dot and leaves a fading trail. Draw once paints the finished picture. If your device asks for reduced motion, the page opens in Draw once and nothing moves until you press Live.
Controls
- Steppers a and b: whole numbers from 1 to 12, the frequencies of x and y.
- Presets: seven musical intervals. A preset also picks a clear phase and resets the detune.
- Tuning: pure ratio uses the whole numbers exactly. Equal temperament rounds the interval to the nearest number of semitones k and uses 2k/12.
- Fine detune: adds up to 0.2 to the y frequency, so the figure turns slowly.
- Phase, amplitudes, line, trail, speed: phase δ in degrees; the size of the figure in each direction (also the loudness of each ear); line thickness; seconds of trail; how fast the dot moves.
- Damped mode: both amplitudes decay exponentially, with separate rates for x and y.
- Sound: volume and the lower tone. The higher tone is the lower one times the ratio, limited to 4000 Hz.
- Save PNG downloads the picture.
How it works
The curve is the path of a point whose coordinates are two sine waves:
When a and b are whole numbers, both coordinates return to their starting values together after t = 2π divided by the greatest common divisor of a and b, so the curve closes. It closes exactly when a : b is a ratio of whole numbers; otherwise the dot never repeats.
To read the ratio from a closed figure, reduce it first (6:4 draws the same shape as 3:2). Then count where the curve touches the edges of its bounding box: it touches each side edge as many times as the reduced x number and the top edge as many times as the reduced y number. A 3:2 figure touches each side edge three times and the top edge twice. At special phases the curve is traced forward and back along itself and the count no longer applies. With equal frequencies and A = B, a phase of 0° gives a diagonal line, 90° a circle and 180° the other diagonal.
Simple ratios sound consonant. In pure tuning a perfect fifth is 3:2, a fourth 4:3, a major third 5:4, a minor third 6:5 and a major sixth 5:3. Keyboards mostly use equal temperament, with twelve equal steps of 21/12 per octave. The equal-tempered fifth is 27/12 = 1.4983, about two cents flat of 3:2, and the major third is 24/12 = 1.2599, about 14 cents sharp of 5:4. These numbers are irrational, so the figure never closes: the phase slips a little every cycle and the lines fan out.
The picture uses the same ratio as the sound, at much lower frequencies, so you can follow it. With damping, each amplitude is multiplied by e−kt, which draws an inward spiral.
The French physicist Jules Antoine Lissajous (1822–1880) studied such curves in 1857 by bouncing a beam of light off mirrors fixed to two vibrating tuning forks at right angles. Equal pitch gave a still figure, and a small mismatch made it turn. The American mathematician Nathaniel Bowditch had studied similar curves in 1815. An oscilloscope in X-Y mode does the same with electrical signals, and engineers use the figures to compare frequencies and measure phase.
Things to try
- Press Fifth 3:2 and count three touches on each side edge and two on the top edge.
- Set 1:1 with A = B and move the phase from 0° to 90° to 180°: line, circle, line.
- On Unison, move the detune slightly off zero and watch the figure turn.
- Switch Fifth to equal temperament and press Draw once to see the lines fan out. Switch back and they close.
- Set 2:1 and the phase to 90°: the curve collapses to an arc traced back and forth.
- Turn on Damped mode with 3:2 and press Draw once to see a spiral. Give x and y different decay rates.
Frequently asked questions
Why do simple ratios give closed curves?
Both coordinates repeat after a fixed time. If those times fit a whole number of times into a common time, the dot returns to its start and retraces the same path.
Why do I need headphones?
The left channel carries x and the right channel carries y. On one speaker both tones reach both ears, so you hear a chord rather than two separate tones.
Is this the real waveform of the sound?
Not exactly. It has the same ratio and phase as the sound, but it is slowed from hundreds of cycles per second to a few, so the eye can follow it.
Why does equal temperament never close?
Its ratios are powers of 21/12, which are irrational except for whole octaves. No whole numbers a and b match them exactly.