What if a MIDI file doesn't have Program Change events? What a program will be used to make sound? Is it explicitly specified somewhere in the MIDI specs or it's completely up to a synthesizer that will produce sound while the file is playing?
If the playback system has had nothing previously set, then the channels will be set to 0 (zero) which for GM will be Piano.
Is it just a rule of thumb or all playback systems must set program to zero at start? As far as I understand, if there are no any spec on that, the behavior is totally up to synthesizer. So it can set program to 100 if it's built in this way. Am I right?
Any software would normally initialise data to zero, In MIDI terms, for PC, then just happens to be Piano. I would not expect any sensible software to initialise to anything else. As far as PC (Instrument) is concerned, Piano is probably a reasonable default choice anyway.
A Sound Module could well default to a specific setup. The Roland LAPC-I card I use (MT-32 compat) does default the channels to:
(1 to 16)
1: Not set
2: Slap Bass 1
3: Str Sect 1
4: Brs Sect 1
5: Sax 1
6: Ice Rain
7: Elec Piano 1
9: Orche Hit
but that setup seems pretty arbitrary to me?
Just to see what's there, I've just tried my Yamaha MU90r unit in it's default XG mode and the parts there are:
According to the MIDI specification, if no Program Change (preceded by Bank Select messages if necessary) is issued to change the 'instrument' used, then the default is grand piano.
If a file has been played previously using a MIDI file player, and that file changed the voices on the various channels using Program Changes and no intervening GM reset was issued, then the player will continue using the already selected voices.
If a GM reset SysEx is issued then all 'instruments' should revert back to piano again.
That's why a GM reset at the start of every SMF, before the various instrument allocations, is a good idea.
@JohnG, but what about equipment of @Geoff? As we can see, default programs on many channels are not the Grand Piano. Does it violate the specs? Also can you please say where Grand Piano is specified as the default program in the MIDI specification?
I don't recall it being a specific requirement until the GM2 spec. came out, which dates it to about 1999.
In that spec, (now at version 1.2 (2007) ) on page 5, where it defines the Program Change message, it states:
"3.2 Program Change Message
Default Value: 1 (00H)"
So, any device that came out before GM or GM2 would probably not default to this value.
I suspect that applies to the MT32, that was very early as I recall.
Any MIDI sound card or module that displays GM or GM2 should conform to the standard though.
Very early devices, pre GM1, didn't even follow the instrument mapping now commonplace.
So a Program Change of 00H wouldn't neccesarily invoke Piano.
I don't think my TX81z did, nor do many early synthesizers.
I vaguely recall having to alter the Program Changes for various early internal PC cards to get the sound you wanted up until GM1 came out and sound cards started to conform to it. So, for me, from the mid eighties to the late nineties.
Take a look at the 'voice' assignments for a DX-7 MkI or MkII.
My ancient AN1x doesn't follow the rules either. Nor does my VL70m and several others.