In a midi file, is it possible to have more than 16 instruments at the same time? because I read that they could use ports but the 0x21 meta event is obsolete, so they are limited to only 16 channels and if I make two tracks that use the same channel and different instrument, would they keep changing the program for each note?
If I have two tracks with the same instrument and the same channel, do they usually send a program change event for each track?
[quotePost id=14638]If I have two tracks with the same instrument and the same channel, do they usually send a program change event for each track?[/quotePost]
It depends on what software is used as to what is "usual" but ultimately, no, it's not necessary. In your scenario of two tracks using the same channel (on the same device) a program change in one track is all that is necessary to change the instrument in that channel.
Yes, but I'm asking to see if I have to check all the tracks to know what the current program is or can I just trust what the current track says.
Your options to use multiple ports will be dependant on the software you use, and prob the OS as well, and also the device(s) that will receive the midi and make the noises. Everything needs the same capabilities.
For example, I have sound modules that can use USB with two ports, giving me 32 channels, not the software I have does not know about this, and I'm using DIN connectors, so I'm using 16 channels ONLY.
You can use as many tracks as your software will support, regardless of this, but you can have only one instrument (program) active on each channel at a time. So with 16 channels, that's 16 different instruments at a time. BUT you could use different versions of the same instrument at the same time on one track, or different tracks, to make chords, and the PC (Program Change) applies to the Channel not the track.
If you have certain instruments that are used occasionally during your music, you might be able to put these all on the same channel, but they could be on different tracks to keep things tidy, with numerous PC commands as you change instruments. I have numerous midi files that do this. Just needs a lot of extra planning re channels, instruments and tracks.
Geoff
[quotePost id=14641]Yes, but I'm asking to see if I have to check all the tracks to know what the current program is or can I just trust what the current track says.[/quotePost]
You have to check all tracks, if you want to be certain. Don't make assumptions.
[quotePost id=14643]Your options to use multiple ports will be dependant on the software you use, and prob the OS as well, and also the device(s) that will receive the midi and make the noises. Everything needs the same capabilities.[/quotePost]
I have a midi that uses 4 ports, it sets the configuration to ports 0, 1, 2 and then switches to 3 to start playing, wouldn't that be like ignoring all of the above? and it also has many program changes that cancel the previous ones several times.
[quotePost id=14645]
You have to check all tracks, if you want to be certain. Don't make assumptions.[/quotePost]
That complicates things more.
Code like this in the beginning of each track does not make much sense:
the first program change and other settings before the "MIDI port" event go to the default port, not to port 01.
Also, why one needs multiple "MIDI Port" events?
[ 413] 0: b1 79 00 -- Reset All Controllers
[ 417] 0: c1 21 -- Program Change (Electric Bass (finger))
[ 420] 0: b1 07 64 -- Channel Volume MSB
[ 424] 0: b1 0a 40 -- Pan MSB
[ 427] 0: b1 5b 00 -- Effects 1 Depth
[ 430] 0: b1 5d 00 -- Effects 3 Depth
[ 433] 0: ff21 -- MIDI Port: 01
[ 438] 0: b2 79 00 -- Reset All Controllers
[ 442] 0: c2 24 -- Program Change (Slap Bass 1)
[ 445] 0: b2 07 64 -- Channel Volume MSB
[ 449] 0: b2 0a 40 -- Pan MSB
[ 452] 0: b2 5b 00 -- Effects 1 Depth
[ 455] 0: b2 5d 00 -- Effects 3 Depth
[ 458] 0: ff21 -- MIDI Port: 01
[ 463] 0: b3 79 00 -- Reset All Controllers
[ 467] 0: c3 25 -- Program Change (Slap Bass 2)
[ 470] 0: b3 07 64 -- Channel Volume MSB
[ 474] 0: b3 0a 40 -- Pan MSB
[ 477] 0: b3 5b 00 -- Effects 1 Depth
[ 480] 0: b3 5d 00 -- Effects 3 Depth
[ 483] 0: ff21 -- MIDI Port: 01
I don't know why they do that, I found another file that does something similar.
Code like this in the beginning of each track does not make much sense
These events were probably merged or copy-pasted in some program that does not know about the dependencies between them.
If you want to create multi-port MIDI files, you have to double-check before you can trust your software.
A Type 0 Standard MIDI File contains a single track which supports the 16 Channels of MIDI data.
A Type 1 Standard MIDI File can contain multiple Tracks. Each track supports 16 Channels of MIDI data.
So a Type 1 file can play hundreds of instruments (up to the limit of the sequencer).
Tracks would need to be routed to more than 1 port - or each track controls a different plugin.
Mike.
Technical Standards Board, MIDI Association
Chair of MIDI 2.0 Working Group
Mike,
I think you need to clarify this?
What you say may be true as regards the sequencer software, but ONLY incidentally.
It is totally dependant however on the use of ports, and USB, and of course the support of the device(s) that actually implement the midi commands.
For example, regardless of the sequemcer system I'm using, if I'm using DIN connectors to drive my Tone Module, I've got 16 channels ONLY to play with, and that's a maximum of 16 instruments at a time, like it or not. 😉
Geoff