Hmm, so I am working on a midi file, and when I went to change the percussion kit in my instrument switcher, only one of the two percussion instruments changed kit. I thought I recently broke something in my code, but I just now realized that each instrument is on its own track, and I current restrict changes like that per track, because presumably each track has its own program change on it.
I know I've asked previously about rapid percussion kit switching, but it was all pertaining to a single track with multiple kits.
Is it acceptable to have a different kit on each track and still played together on the same channel, or would this get ignored since there are theoretically not going to be constant program changes happening? Or does it not matter because each track has its own program change, and it should technically respect that?
In my instance, I have a file where I have a track that just has a bass drum played on channel 10, and a track that just has a snare played on channel 10. Both tracks have a single bank select and program change at the beginning of the track.
As currently set up, I can modify either one or both of those individually, so I could have Room Kit on one track and Jungle Kit on another. Is this "legal"? Or do I need to modify my code to be more strict when grouping kits together for editing purposes?
MIDI itself has no concept of tracks; there are only channels.
If your file has two tracks with bank selects and program changes on the same channel, then the latest message is the one that takes effect.
Jason,
I agree with what Clemens says.
It's quite OK to use two tracks for tidyness. But if they use the same channel, then any Program or Bank changes will affect BOTH tracks.
If you are careful with the timings, and make sure that the different selections are NOT interfering with each other, then you could swap settings OK. You could do this with one track, but using two might help you manage things, then some of your automated operations could do things with one track and not the other. You'd maybe need to block out the two tracks, timewise, and make sure your process was working by track and NOT by channel.
Geoff
Yes, I keep confusing the way percussion works in my brain. The bank select/program change is only for kit selection. There is no program change when each "instrument" plays, but I treat them similarly to standard instruments in my editor, so I forget sometimes. My thought process was something along "But it still plays the bass drum and snare, even though they both only have a single program change at the beginning. How?" It's because that program change does not affect the actual instrument choice(drum, snare, cymbal, etc), as that is made by the "note value" that is played instead. Makes sense. Thanks.
If I'm going to make any further changes to the way I modify kits, I think I'll need to take elapsed time in to consideration. Currently all of my processing is done strictly from start of file to end of file, and I tag the channel with the kit number until I find the next change (in byte order), which doesn't necessarily line up with the next change (in elapsed time order) if there are multiple percussion tracks.