This simulation visualises musical scales as frequency ratios built on top of a piano-style keyboard. Choose a root note and scale type and the tool lays out the intervals in semitones, computing each note's frequency with the equal-temperament formula f = 440 × 2^((n−69)/12). Switch on the Pythagorean comparison to see how a chain of pure 3:2 fifths drifts away from equal temperament by up to 23.46 cents — the famous Pythagorean comma. Click any key to hear it and read off its exact frequency, ratio to the root, and cents deviation.
A one-octave keyboard where highlighted keys mark the notes of the selected scale (major, natural minor, major/minor pentatonic, chromatic 12-TET, or blues). Bars above each key show relative frequency, scale-degree numbers appear above in-scale notes, and a second chart plots the cents deviation between equal temperament and Pythagorean tuning across all 12 semitones.
Pick a Root note (C–B) and a Scale type, then drag the Octave slider (2–6) to shift register. Set Tuning comparison to "Show Pythagorean comparison" to reveal the deviation chart. Press Play Scale to hear the notes in sequence, or click directly on a key to play that note and see its frequency, Pythagorean equivalent, cents deviation and ratio to the root in the live readouts.
In 12-tone equal temperament every semitone is exactly the twelfth root of two (≈1.05946) times the one below it, so every key sounds evenly spaced but no interval except the octave is perfectly pure. Pythagorean tuning instead stacks exact 3:2 fifths, which sound purer in some keys but leaves a leftover gap — the Pythagorean comma — when you close the circle back to the octave.
Equal temperament (12-TET) divides the octave into 12 equal steps so that every semitone has the same frequency ratio, 2^(1/12) (about 1.05946). That uniformity means music can be played and transposed into any key with the same relative intervals, which is why it became the standard tuning for pianos and most modern instruments, at the cost of no interval other than the octave being mathematically pure.
The simulation uses the standard formula f = 440 × 2^((n−69)/12), where 440 Hz is the reference pitch for A4 (MIDI note 69) and n is the MIDI note number of the target pitch. Raising or lowering n by 12 doubles or halves the frequency, since that represents a full octave.
Pythagorean tuning builds a scale by stacking perfect 3:2 frequency ratios (pure fifths) instead of equal semitone steps. It produces very consonant fifths, but because twelve pure fifths do not exactly equal seven octaves, the tuning accumulates a small mismatch called the Pythagorean comma, roughly 23.46 cents, which the simulation's comparison chart displays note by note against equal temperament.
Major and natural minor are the familiar seven-note diatonic scales; major and minor pentatonic use five notes drawn from those scales and are common in folk and rock melodies; the blues scale adds a flattened "blue" note for its characteristic sound; and chromatic includes all 12 semitones with no notes skipped, useful for comparing every interval at once.
A cent is one-hundredth of an equal-tempered semitone, a standard unit for measuring small pitch differences. The simulation computes cents deviation as 1200 × log2(Pythagorean frequency ÷ equal-temperament frequency) for each note, showing precisely how far a pure-fifth-based pitch has drifted from its equal-tempered counterpart at that scale degree.