def program_to_instrument_name(program_number):

    # Check that the supplied program is in the valid range
    if program_number < 0 or program_number > 127:
        raise ValueError('Invalid program number {}, should be between 0 and'
                         ' 127'.format(program_number))
    # Just grab the name from the instrument mapping list
    return INSTRUMENT_MAP[program_number]
Converts a MIDI program number to the corresponding General MIDI
dataset/ETHPy150Open craffel/pretty-midi/pretty_midi/utilities.py/program_to_instrument_name