Pitch is (approx.) logarithmically dependent on frequency
- frequency x 2 when pitch goes up an octave
- Hz and Hz
- frequency x when pitch goes up by a semitone. See equal temperament for why we have 12 notes.
frequency (Hz) <-> pitch (key number) conversion
On the standard piano (12TET, 49th key tuned to at ), the frequency of the key is given by
Conversely, the key number of a pitch with a frequency on the idealized standard piano is: