def hz_to_note_number(frequency):
    # MIDI note numbers are defined as the number of semitones relative to C0
    # in a 440 Hz tuning
    return 12*(np.log2(frequency) - np.log2(440.0)) + 69
Convert a frequency in Hz to a (fractional) frequency
dataset/ETHPy150Open craffel/pretty-midi/pretty_midi/utilities.py/hz_to_note_number