Coda

Bear in mind that everything here is in relation to the even tempered (aka equal tempered) scale, where an octave is a frequency ratio of exactly two and a semitone is a frequency ratio of exactly the twelfth root of two. In the real world however many different temperaments may be used - see
en.wikipedia.org/wiki/Musical_temperament
- and octaves too can vary in size, see
en.wikipedia.org/wiki/Stretched_octave.

Also we call middle C "C4" : this is the commonest octave numbering but some people call middle C "C3" or even "C5".