Are the instruments different for GM GM2 GS XG?
Hello,
Very interesting to be reminded about the website re the adventures/queststudios.
I'd been to that site some time ago, but lost the links to it. Seeing it again, I note the reference to the long/complete soundtracks. I need to check some of them out.
I use the Roland card LAPC-I as part of my midi system, this is MT-32 compat, so it will respond to the SYSEX load of the special sounds (instruments & sound effects). I've heard bits from other soundtracks and these special sounds can add a LOT to the effectiveness of the soundtrack. This is of course one of the interesting aspects of the Roland card, there are so many 'extras' readily available. My Yamaha MU90r has a C/M mode as an alternative to the default XG mode, and this will cope with the 'normal' MT-32 sound set, but this does NOT allow the special/extra sounds as the sound programming is totally different.
Geoff
Thanks, in my code I read always assuming that the variable length byte exists, I save it and use it to read the rest of the message so it always looks like in hardware, is it ok to do that?
For GM I found this http://midi.teragonaudio.com/tech/midispec/sysen.htm it says that the third byte is the channel, in this case it ignores the channel, can it be something other than 7F?
I was analyzing the file that I uploaded, in this case it would be a GM and XG file at the same time
F0 7E 7F 09 01 F7 -> GM ON
F0 43 10 4C 00 00 7E 00 F7 -> XG reset
Is there the same code to turn off GM?
F0 7E 7F 09 00 F7 -> GM OFF
If there is no active type, it would be the "classic" midi, what is its name? Is GM equal to GM1?
For GM1 System On and GM2 System On
//GM reset
//F0 7E 7F 09 01 F7 (GM1 hardware)
//F0 05 7E 7F 09 01 F7 (GM1 software)
//F0 7E 7F 09 03 F7 (GM2 hardware)
//F0 05 7E 7F 09 03 F7 (GM2 software)
F0 7E 7F 09 01 F7 -> GM ON
F0 43 10 4C 00 00 7E 00 F7 -> XG reset
Is there the same code to turn off GM2?
F0 7E 7F 09 00 F7 -> GM OFF according to teragonaudio.com
F0 7E 7F 09 02 F7 -> GM OFF according casio manual
There is: https://github.com/jazz-soft/JZZ-midi-GM
You can have them printed from your MIDI file using this tool: https://github.com/jazz-soft/test-midi-files
The bank selector allows many different instruments, is there a list with the names?
// GM reset
// F0 7E 7F 09 01 F7 (GM1 hardware)
// F0 05 7E 7F 09 01 F7 (GM1 software)
// F0 7E 7F 09 03 F7 (GM2 hardware)
// F0 05 7E 7F 09 03 F7 (GM2 software)
case 0x05:
cur_pos = buffer_tell(global.edit_buffer);
if ((buffer_peek(global.edit_buffer, cur_pos, buffer_u8) == 0x7E) &&
(buffer_peek(global.edit_buffer, cur_pos + 1, buffer_u8) == 0x7F) &&
(buffer_peek(global.edit_buffer, cur_pos + 2, buffer_u8) == 0x09) &&
((buffer_peek(global.edit_buffer, cur_pos + 3, buffer_u8) == 0x01) || (buffer_peek(global.edit_buffer, cur_pos + 3, buffer_u8) == 0x03)) &&
(buffer_peek(global.edit_buffer, cur_pos + 4, buffer_u8) == 0xF7))
// Yamaha XG reset
// F0 43 (10) 4C 00 00 7E 00 F7 (hardware)
// F0 08 43 (10) 4C 00 00 7E 00 F7 (software)
case 0x08:
cur_pos = buffer_tell(global.edit_buffer);
if ((buffer_peek(global.edit_buffer, cur_pos, buffer_u8) == 0x43) &&
/*(buffer_peek(global.edit_buffer, cur_pos + 1, buffer_u8) == 0x10) &&*/
(buffer_peek(global.edit_buffer, cur_pos + 2, buffer_u8) == 0x4C) &&
(buffer_peek(global.edit_buffer, cur_pos + 3, buffer_u8) == 0x00) &&
(buffer_peek(global.edit_buffer, cur_pos + 4, buffer_u8) == 0x00) &&
(buffer_peek(global.edit_buffer, cur_pos + 5, buffer_u8) == 0x7E) &&
(buffer_peek(global.edit_buffer, cur_pos + 6, buffer_u8) == 0x00) &&
(buffer_peek(global.edit_buffer, cur_pos + 7, buffer_u8) == 0xF7))
// GS reset
// F0 41 (10) 42 12 40 00 7F 00 41 F7 (hardware)
// F0 0A 41 (10) 42 12 40 00 7F 00 41 F7 (software)
case 0x0A:
cur_pos = buffer_tell(global.edit_buffer);
if ((buffer_peek(global.edit_buffer, cur_pos, buffer_u8) == 0x41) &&
/*(buffer_peek(global.edit_buffer, cur_pos + 1, buffer_u8) == 0x10) &&*/
(buffer_peek(global.edit_buffer, cur_pos + 2, buffer_u8) == 0x42) &&
(buffer_peek(global.edit_buffer, cur_pos + 3, buffer_u8) == 0x12) &&
(buffer_peek(global.edit_buffer, cur_pos + 4, buffer_u8) == 0x40) &&
(buffer_peek(global.edit_buffer, cur_pos + 5, buffer_u8) == 0x00) &&
(buffer_peek(global.edit_buffer, cur_pos + 6, buffer_u8) == 0x7F) &&
(buffer_peek(global.edit_buffer, cur_pos + 7, buffer_u8) == 0x00) &&
(buffer_peek(global.edit_buffer, cur_pos + 8, buffer_u8) == 0x41) &&
(buffer_peek(global.edit_buffer, cur_pos + 9, buffer_u8) == 0xF7))
// GS Custom Percussion Assignment
// F0 0A 41 (10) 42 12 [40 1A 15] [02] 0F F7
// [.. 1x ..] x = part# / (probably) ch# 1-9, 0, A-F
// [0y] y = type: 0 = standard, 1 = drum map 1, 2 = drum map 2
else if ((buffer_peek(global.edit_buffer, cur_pos, buffer_u8) == 0x41) &&
/*(buffer_peek(global.edit_buffer, cur_pos + 1, buffer_u8) == 0x10) &&*/
(buffer_peek(global.edit_buffer, cur_pos + 2, buffer_u8) == 0x42) &&
(buffer_peek(global.edit_buffer, cur_pos + 3, buffer_u8) == 0x12) &&
(buffer_peek(global.edit_buffer, cur_pos + 4, buffer_u8) == 0x40) &&
/*(buffer_peek(global.edit_buffer, cur_pos + 5, buffer_u8) == 0x00) &&*/
(buffer_peek(global.edit_buffer, cur_pos + 6, buffer_u8) == 0x15) &&
/*(buffer_peek(global.edit_buffer, cur_pos + 7, buffer_u8) == 0x00) &&*/
(buffer_peek(global.edit_buffer, cur_pos + 8, buffer_u8) == 0x0F) &&
(buffer_peek(global.edit_buffer, cur_pos + 9, buffer_u8) == 0xF7))
{
part_num = buffer_peek(global.edit_buffer, cur_pos + 5, buffer_u8);
part_num -= 0xF;
part_type = buffer_peek(global.edit_buffer, cur_pos + 7, buffer_u8);
global.custom_drums[part_num - 1] = part_type;
}
I found https://midi.org/forum/8860-general-midi-level-2-ch-11-percussion according to what I understand I must first search SYSEX to know if it is GM, GS or XG what are the sysex messages for each one ? Can there be more than one at a time?.
Finding what instrument is playing is harder than it seems and here I thought I could completely ignore sysex messages.
The bank selector allows many different instruments, is there a list with the names? although perhaps there are too many more than 2 million, right?
what if you have an instrument (program) 113 to 120 on a channel other than 10?
where does 1x and 0y go?
I don't understand this
GM percussion is always on Channel 10.
GM2 percussion can be on 10 and/or 11, set with MSB = 120 (instrument channels have MSB = 121)
GS percussion can be on any channel, and is set with a SYSEX command.
// F0 0A 41 (10) 42 12 [40 1A 15] [02] 0F F7
// [.. 1x ..] x = part# / (probably) ch# 1-9, 0, A-F
// [0y] y = type: 0 = standard, 1 = drum map 1, 2 = drum map 2
F0 -> start sysex
0A -> variable length of 10 bytes
41
10 -> ¿channel?
42
12
40
1A -> 1x?
15
02 -> 0y?
0F
F7 -> end sysex
The midi file indicates in some way if it is GM Level1 or GM Level2, because at GM level1 the notes transmitted by channel 10 are percussion, in level2 it uses channel 10 and 11, I even have a midi file that has the drums for the channel 7, it sounds like drums because it uses the bank select but I don't know how to detect that it's drums and not a piano
// GS Custom Percussion Assignment
// F0 0A 41 (10) 42 12 [40 1A 15] [02] 0F F7
// [.. 1x ..] x = part# / (probably) ch# 1-9, 0, A-F
// [0y] y = type: 0 = standard, 1 = drum map 1, 2 = drum map 2
Just found out...
Windows Media Player does not care about type 2 MIDI files, it plays both tracks simultaneously.
It also does not mind if a type 0 MIDI file has more than one track, just plays all as type 1.
You can try these with other players...
For LARGE MIDI files, you can have a look here:
http://www.midimusicadventures.com/queststudios/midi-soundtracks/complete-soundtracks/
I like to imagine a Type 2 MIDI file is sort of like a zip file that contains several Type 0 MIDI files. You would have to let the user choose which track to play. They might only want to play one track. They might want to play all the tracks in order one after another.
The MIDI Technical Fanatic's Brainwashing Center (midi.teragonaudio.com) contains pretty good descriptions of MIDI specifications, but be aware that it is not official and sometimes gets some details wrong. It's always a good idea to look at the official specifications in the midi.org Specs section first, then read other sites for comparison.
I like to imagine a Type 2 MIDI file is sort of like a zip file that contains several Type 0 MIDI files. You would have to let the user choose which track to play. They might only want to play one track. They might want to play all the tracks in order one after another.How do you know which sequence to play?
That page is about MIDI Show Control messages. MIDI Show Control messages are for controlling devices for a light show, smoke effects, or fireworks at a concert.Does it have anything to do with this?
http://jac.michaeldrolet.net/SCS_10_Help/scs_options_mid_msc.htm
In a Type 2 MIDI file, the tracks are not intended to be played at the same time -- each track is a separate piece of music.
Yes, this empire.mid is exactly the same as the one from the previous thread Jason mentioned.I found the file I was thinking of. May well have come from Jonas, you may already have got it. I think the file originates from a StarWars game of some type. [...] I attach a .zip file. This contains the original empire.mid [...]
Note that the only places the tick position gets reset to zero is when a new track starts, so that is perfectly normal.you will see two small sections, each of which has the delta time reset to 000. In one case, there's a note that is turned ON before the 'break', and turned OFF in the new section.
In a Type 2 MIDI file, the tracks are not intended to be played at the same time -- each track is a separate piece of music.doesn't it play all 3 tracks at once?