Caution
You're reading the documentation for a development version. For the latest released version, please have a look at 0.10.2.
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.])