Share via


Patch Numbers and Bank Select

Windows Media Encoder SDK banner art

Each instrument played by the synthesizer has a patch number used to identify the instrument when it is mapped to PChannels.

Because a single data byte is used to select the patch number in a program change, and only 7 bits in each data byte of a MIDI message are significant, a program change can select from a maximum of 128 instruments. To provide a greater choice, the MIDI specification allows for the use of up to 16,384 instrument banks, each containing up to 128 instruments.

To select an instrument from a different bank, the MIDI sequencer must first send a control change message called bank select. The two data bytes of this message are referred to as the most significant byte (MSB) and least significant byte (LSB), and they are combined to identify a bank. Once the bank has been selected, each subsequent program change selects an instrument from that bank.

The combination of the MSB, LSB, and patch number gives each instrument sound a unique identification. These numbers are displayed in several places in DirectMusic Producer, including the following:

If you assign a PChannel to play using an instrument that is not available—for instance, if a custom DLS collection has not been installed on another user's computer—the instrument plays silently.