audioflux.utils.hz_to_midi

audioflux.utils.hz_to_midi(frequencies)

Convert the frequency (Hz) to MIDI number.

Parameters
frequencies: float

the frequency

Returns
out:

MIDI number

Examples

>>> import audioflux as af
>>> af.utils.hz_to_midi(32.703)
23.99989642029834
>>> af.utils.hz_to_midi(110)
45.0
>>> af.utils.hz_to_midi(220)
57.0
>>> af.utils.hz_to_midi(440)
69.0