[Function]
(octave-number freq [scale] [real?)

Returns the octave number of freq, which can be a note or keynum in scale. If real? is true then the octave number returned is shifted by the octave offset of the tuning.

cm> (octave-number 'c4) 4 cm> (octave-number 'c4 *scale* true) 5 cm> (octave-number 59) 3 cm> (octave-number 0) -1 cm>

See Also: