Microsoft DirectX 9.0 |
In DirectMusic, the instrument patch number is not the seven-bit MIDI patch number but a 32-bit value that packs the MIDI patch number together with the MSB and LSB of the bank select and a one-bit flag for a drum kit. This extended patch number is returned by the IDirectMusicCollection8::EnumInstrument, IDirectMusicCollection8::GetInstrument, and IDirectMusicInstrument8::GetPatch methods. It can be changed for an instrument by using the IDirectMusicInstrument8::SetPatch method.
The organization of DirectMusic patch values is shown in the following table.
Bits | Purpose |
0-7 | MIDI patch number (bit 7 is always 0) |
8-15 | LSB bank select (bit 15 is always 0) |
16-23 | MSB bank select (bit 23 is always 0) |
24-30 | Unused |
31 | Flag for drum kit |