I'm using the Python Mido
library to create MIDI files. I've figured out that to change the
instrument you add a program_change
message to the track for the
given channel:
from mido import Message, MidiFile, MidiTrack
track = MidiTrack()
...
track.append(Message('program_change', program = 36,
time = 1234, channel = 0)
This works but I can only access the GM MIDI Level 1 instruments. I want to access the GM MIDI Level 2 instruments too.
Please show me using code how to do this. All the MIDI documentation I've found by googling is incredibly confusing.
The GM 2 specification says:
So to access the other instruments, you have to select a different bank before sending the program change message. For example, to select "Bubble":