def program_to_instrument_class(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_CLASSES[int(program_number)/8]
Extract vocab, and convert file into integer sequences, and write to output file.
dataset/ETHPy150Open craffel/pretty-midi/pretty_midi/utilities.py/program_to_instrument_class--crossover with--dataset/ETHPy150Open yuhaozhang/nnjm-global/code/io_preprocess.py/map_file