signal/pitch
src/signal/pitch.tur
defn
mtof
(mtof [m :float] :float)
MIDI note number to frequency in Hz.
Parameters
| m | note number; 69 is A4, 60 is middle C |
Returns
The frequency in Hz.
Example
(mtof 69.0) ; => 440 (mtof 60.0) ; => 261.626
Since: signal v0.1.0
defn
ftom
(ftom [f :float] :float)
frequency in Hz to MIDI note number.
Parameters
| f | frequency in Hz, > 0 |
Returns
The note number.
Example
(ftom 440.0) ; => 69 (ftom 450.0) ; => 69.3891 (39 cents sharp of A4)
Since: signal v0.1.0
Internal definitions
__pitch_exp2-- 2 raised to `x`.__pitch_log2-- base-2 logarithm of `x`.