This is interesting: I see that if I skip specifying the instrument and merely specify channel 10 and kMusicNoteEvent_UseGroupInstrument as the instrument number, I do get the standard kit. Which at least shows that the DLS synth works for standard kit. But that precludes specifying a different kit, assuming others are supported. Does anyone know what value to pass as an instrument number in order to get each of the drum kits? Apparently the old constants based on 0x4000 are not operative here...
Jeff
Thanks - Yes, I'm using channel 10. I think. That at least is how I understand the MusicDeviceStartNote arguments:
MusicDeviceStartNote (synth, //the dls synth instrument, //instrument i.d. Here I'm using 0x4001 for standard kit channel, //"MusicDeviceGroupID" - seems to be equivalent to channel? outNoteID, //pointer to note id... 0, //sample frame offset noteParams);
I always used 0x4001 as the instrument number for standard kit when doing QuickTime Music Instruments. Perhaps this constant is the problem? Or maybe I'm misunderstanding the meaning of "MusicDeviceGroupID" ?
Jeff
On Jun 12, 2009, at 1:26 PM, Brian Willoughby wrote:
On Jun 12, 2009, at 12:56, Jeff Evans wrote:
Using MusicDeviceStartNote I'm unable to get sounds from the DLS Synth using the "standard kit" percussion instrument (0x4001). Or any of the other drum kits, for that matter, though I know synths often don't support more than the standard kit.
MusicDevicePrepareInstrument() returns noErr when asked to prepare the standard kit with the DLS synth, but then MusicDeviceStartNote produces the same default piano sound as before. Sort of makes me think that the upper byte of that word is being ignored and I'm getting instrument 1 instead.
All other instrument changes work fine, it's only the drum kits that do not. Does the DLS Synth not support the drum kits? Or is there some special step needed to select them?
I know very little about DLS, but General MIDI has been around a long time. Are you sending your MIDI Notes on Channel 10? The General MIDI standard is to have drums on channel 10, and perhaps the DLS is expecting this.
Brian Willoughby Sound Consulting
-- If this email is spam, report it here: http://www.onlymyemail.com/view/?action="">
|