Caution
You're reading an old version of this documentation. If you want up-to-date information, please have a look at 0.9.1.
librosa.hz_to_midi¶
- librosa.hz_to_midi(frequencies)[source]¶
Get MIDI note number(s) for given frequencies
- Parameters
- frequenciesfloat or np.ndarray [shape=(n,), dtype=float]
frequencies to convert
- Returns
- note_numsnumber or np.ndarray [shape=(n,), dtype=float]
MIDI notes to
frequencies
See also
Examples
>>> librosa.hz_to_midi(60) 34.506 >>> librosa.hz_to_midi([110, 220, 440]) array([ 45., 57., 69.])