librosa.midi_to_hz¶
- librosa.midi_to_hz(notes)[source]¶
Get the frequency (Hz) of MIDI note(s)
- Parameters
- notesint or np.ndarray [shape=(n,), dtype=int]
midi number(s) of the note(s)
- Returns
- frequencynumber or np.ndarray [shape=(n,), dtype=float]
frequency (frequencies) of
notes
in Hz
See also
Examples
>>> librosa.midi_to_hz(36) 65.406
>>> librosa.midi_to_hz(np.arange(36, 48)) array([ 65.406, 69.296, 73.416, 77.782, 82.407, 87.307, 92.499, 97.999, 103.826, 110. , 116.541, 123.471])