I am in the process of adding support for drum kits on multiple channels. It works in my app, which is to say it works on stream and playing side of BASSMIDI, once the MIDI_EVENT_DRUMS event has been sent to the stream. My trouble is in detecting it from the MIDI file itself. I see that setting drum channels is done differently for GM/2, GS and XG. In this forum I've also explanations of the different ways they are encoded, however I don't feel confident to code all those detections. Could a way be created in BASSMIDI to query which channels in a MIDI stream are drum channels, where the query takes into account all the ways it might be encoded? The question does keep resurfacing, and a comprehensive BASSMIDI query would be very neat.
My technique: In Cakewalk I create a MIDI file and set channel 5 to being drums. I save the MIDI file, close Cakewalk, reopen Cakewalk and the MIDI file. It correctly sets channel 5 to a drum kit. I therefore deduce that it is being encoded in the MIDI file. I look at the MIDI file in a MIDI analyzer, and I see nothing among SYSEX or channel events that suggest declaring the channel to be a drum kit. In BASSMIDI query for MIDI_EVENT_DRUMS events, and there are none (I didn't expect there would be). However I'm in the dark what to test for, and in any case it is only this one MIDI file that I created this one way. If there was an "intelligent" query in BASSMIDI that knew all the techniques and correctly identified drum channels, it would make it clean on the user end.
Just asking - thanks.