How to make MIDI file from notes with Flute instrument in Python (music21 library)
问题 I have some notes and what I want is create the MIDI file with Flute instrument. But what happens is that the output MIDI file plays Piano, instead of Flute. I tried other instruments, but it's always the same, Piano. What is going on? (...) new_note = note.Note(pattern) new_note.offset = offset new_note.storedInstrument = instrument.Piano() output_notes.append(new_note) (...) midi_stream = stream.Stream(output_notes) midi_stream.write('midi', fp='output.midi') 回答1: According to the