User:Steve.hetzler/sandbox

This is a virtual keyboard showing the absolute frequencies in hertz (cycles per second) of the notes on a modern piano (typically containing 88 keys) in twelve-tone equal temperament, with the 49th key, the fifth A (called A4), tuned to 440 Hz (referred to as A440). Each successive pitch is derived by multiplying (ascending) or dividing (descending) the previous by the twelfth root of two (approximately 1.05946309435929...). For example, to get the frequency a semitone up from A4 (A♯4), multiply 440 by the twelfth root of two. To go from A4 to B4 (up a whole tone, or two semitones), multiply 440 twice by the twelfth root of two. For other tuning schemes refer to musical tuning.

This list of frequencies is for a theoretically ideal piano. On an actual piano the ratio between semitones is slightly larger, especially at the high and low ends, where string stiffness causes inharmonicity, i.e., the tendency for the harmonic makeup of each note to run sharp. To compensate for this, octaves are tuned slightly wide, stretched according to the inharmonic characteristics of each instrument. This deviation from equal temperament is called the Railsback curve.

The following equation will give the frequency f of the nth key, as shown in the table:

f(n) = 440\ (\sqrt[12]{2}\,)^{n-49}\, $$

Alternatively, this can be written as:

f(n) = 440 \times 2^{\frac{n-49}{12}}\, $$

Virtual keyboard
