Instrument Number, Banks and DLS/Soundfonts
Instrument Number, Banks and DLS/Soundfonts
- Subject: Instrument Number, Banks and DLS/Soundfonts
- From: Jeremy Sagan <email@hidden>
- Date: Thu, 6 Mar 2003 18:49:52 -0500
Does anybody know the correspondence between
kMusicDeviceProperty_InstrumentNumber, banks and soundfont MIDI bank
control changes?
I use this to get the instrument number.
err = AudioUnitGetProperty(au,
kMusicDeviceProperty_InstrumentNumber,
kAudioUnitScope_Global, i, &MDID, &outDataSize);
later I do this to get the bank
long newBank = MDID >> 7; // shift off the program part of the
instrument number
and finally to change the bank I issue this MIDI command:
MSB = bank >> 7;
LSB = bank & 0x7F;
ControlChange (0xB0), 0, MSB and
ControlChange (0xB0), 32, LSB
The results are very unpredictable if the bank is not equal to zero.
Some soundfonts switch to the correct instrument and others do not.
Please tell me what I am doing wrong?
Also, does anyone know how to switch a regular MIDI channel into a drum
channel (Bill? Sysex?) when using Apple's DLS MusicDevice?
Thanks,
Jeremy
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.