def midi2freq(midi_number):
    """
    Given a MIDI pitch number, returns its frequency in Hz.
    Source from lazy_midi.
    """
    midi_a4 = 69  # MIDI Pitch number
    freq_a4 = 440.  # Hz
    return freq_a4 * 2 ** ((midi_number - midi_a4) * (1. / 12.))