问题 I am using Music21 in Python to read from a MIDI file and I want to only deal with the tracks that use a certain instrument. For example, if, in my MIDI file I have two tracks that use piano I want to be able to print the notes, change the instrument, etc. Right now I have a file with multiple tracks (drums, trumpet etc.) and I am just messing around with it trying to replace a certain instrument with another. However, when I do I get an error and some of the tracks are removed completely