amads.pitch.hz2midi#
Provides the hz2midi function.
Original doc: https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=6e06906ca1ba0bf0ac8f2cb1a929f3be95eeadfa#page=63
- amads.pitch.hz2midi.hz2midi(hertz)[source]#
Convert a frequency in Hertz to the corresponding MIDI note number. Validates input to ensure all frequencies are non-negative.
Parameters: hertz (float or list of floats): The frequency or list of frequencies in Hertz.
Returns: m (float or list of floats): The corresponding MIDI note number(s).
Raises: ValueError: If any frequency is negative.