fbpx


The MIDI Forum

  Friday, 13 May 2022
  35 Replies
  1.1K Visits
2
Votes
Undo
  Subscribe
Hello, could someone lend me some "rare" MIDI files, for example midi 2 format or with SMPTE delta times, I can't find any and also the largest "common" midi file.
The largest midi file I have weighs 84.3Kb and my program takes 0.0137 seconds to read and analyze it, I would like to try something bigger
Thank you. :)
0
Votes
Undo
I'd be curious to hear some of these MT-32 files


You can hear them converted to MP3 on sites like this one.
19 hours ago
·
#14627
0
Votes
Undo
Are the instruments different for GM GM2 GS XG?

GM is a common subset of GM2, GS and XG. Other instruments differ.
However, GM2, GS and XG banks don't overlap, so, theoretically it's possible to support all standards simultaneously.
19 hours ago
·
#14626
0
Votes
Undo
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

That sounds really neat. I know that when I play back XG files on my computer, I can get them sounding pretty good, but when I hear the same file recorded from an actual XG device, the difference is can be astounding. I don't want to hijack this thread, but I'd be curious to hear some of these MT-32 files on your hardware versus how they would play for me on my computer.
19 hours ago
·
#14625
0
Votes
Undo
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?

Yes, that is perfectly fine. However, if you write it back to a MIDI file later you need to include the length byte.

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 have only seen it with 7F. But it can be any device number. 7F broadcasts to all connected devices. Generally, a software MIDI player doesn't care which device number is there. MIDI hardware may only respond to it's own device ID or 7F.
See page 4 of the General MIDI Level 1 specs (page 6 of the pdf).
https://midi.org/specifications/midi1-specifications/general-midi-specifications/general-midi-1
Also page 22 of the General MIDI Level 2 specs (page 26 of the pdf).
https://midi.org/specifications/midi1-specifications/general-midi-specifications/general-midi-2

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

GM OFF is F0 7E 7F 09 02 F7

XG files will usually have a GM ON followed by an XG Reset, without turning GM off.


If there is no active type, it would be the "classic" midi, what is its name? Is GM equal to GM1?

Yes, they are used interchangeably.
21 hours ago
·
#14624
0
Votes
Undo
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 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)





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 GM2?
F0 7E 7F 09 00 F7 -> GM OFF according to teragonaudio.com
F0 7E 7F 09 02 F7 -> GM OFF according casio manual


If there is no active type, it would be the "classic" midi, what is its name? Is GM equal to GM1?



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


Thanks, this was the first midi list I found for my tests. Are the instruments different for GM GM2 GS XG? I have a list of 400 instruments that comes with my Casio piano, but only change the MSB
1 day ago
·
#14623
0
Votes
Undo

The bank selector allows many different instruments, is there a list with the names?

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
1 day ago
·
#14622
0
Votes
Undo
Ahh, so now that I am more awake, here's what I check for each of the SYSEX. This is what works for my particular usage, You may or may not need the same.

I scan the file byte by byte, and a SYSEX event is found and flagged with F0. I then check the length byte, and from there further check the rest of the SYSEX to see if it a reset.

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)
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))


For Yamaha XG Reset

// 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))


And for Roland GS Reset

// 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))


The GM1 and GM2 System On do not specify a device.
The XG and GS DO specify a device ID of some sort. For my purposes, it is not relevant, so I check every byte except for the ID byte.

And finally, for the GS percussion channel assignment SYSEX.
Information about this can be found.... in the manual? I'll have to dig through my stuff when I have more time to see where I got it from. I just did a quick look through the SC-8850 manual but didn't see it, but I'm sure it's in there. SYSEX explanations start around page 229.
https://cdn.roland.com/assets/media/pdf/SC-8850_OM.pdf

// 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;
}
1 day ago
·
#14615
0
Votes
Undo
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?.


This post has useful info about the SYSEX resets:

https://midi.org/forum/8742-do-midi-files-store-gm-gs-xg-indicator-info

While it is helpful for them to be in a MIDI file, sometimes they are not. Actual MIDI hardware can be set to already be in a specific mode, so wouldn't need the reset per se. Some players will automatically detect the type, and if one can't be determined, will revert to GM.

Things that I look for in my program when parsing a MIDI file:
SYSEX resets
- GM1, GM2, GS, XG
Bank Selects
- GM1 does not have bank selects, so if there are none, there's a good chance it's GM1.
- GM2 should have MSB set to 121 for instruments, MSB set to 120 for percussion (though some of the files I have are they not all properly set)
- XG will have LSB values set (GM and GS do not generally use LSB values, while XG does the opposite and uses mostly LSB values)

Finding what instrument is playing is harder than it seems and here I thought I could completely ignore sysex messages.

Welcome to the club ;) The more I learn, the more I have to fix my program.

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?

Theoretically there could be a maximum of 2,097,152 if every MSB and LSB and Program Change were used. But thankfully they are not.

As for a list, I have several taken from instrument definition files for Cakewalk, which are the most complete that I have found. I got some of them from just searching on Google, I think a few also came from the website for Seikaju.
The Roland SC-8850 was the last GS device to be released by Roland (I believe) and has the largest GS compatibility/instrument list (that I am aware of).
I have lists from a couple of the most recent Yamaha XG devices.
GM1 is a standard list of 128 instruments and... I forget how many percussion. GM2 added additional banks of instruments and percussion. I have another file that includes those.

See attachments for these lists. You can also look in the official manuals for the SC-8850 and the assorted Yamaha manuals, but I found it much easier (after spending DAYS compiling my own lists from the manuals) to use the pre-made instrument definition files.
GM1_GM2.ins - GM1 and GM2 names
sw1000xg.ins - big list of (shorter) XG names
9000PROv100.ins - smaller, but nicer list of XG names (I read in all the shorter names from sw1000xg, then replace any matches with nicer names from this list)
Roland_SC-8850.ins - GS names
plus a few extra that I ended up not using.

where does 1x and 0y go?

Where you have them. :)

I don't understand this

That is my own comments for how I handle it. I ignore the parts in ( ), as it can contain different numbers (device ID I believe) that I don't need to determine if it is a GS reset.
The "part #" and "type" are described in the Roland user manuals for different devices. I think one of my previous posts we talked about it, but I am too tired at the moment to be able to think about it any more tonight. ;)

Hopefully this helps out a bit.
1 day ago
·
#14614
0
Votes
Undo

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.


Finding what instrument is playing is harder than it seems and here I thought I could completely ignore sysex messages.
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?.
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?



I don't understand this

// 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

where does 1x and 0y go?
F0 -> start sysex
0A -> variable length of 10 bytes
41
10 -> ┬┐channel?
42
12
40
1A -> 1x?
15
02 -> 0y?
0F
F7 -> end sysex
1 day ago
·
#14613
0
Votes
Undo
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
1 day ago
·
#14611
2
Votes
Undo
I learned a LOT about MIDI over the past year+. If you click on my profile and go to my posts, you can see all of the questions I've asked along the way, many of which seem to be a point you might be at now in developing your own software. This forum is very helpful for such things :)
1 day ago
·
#14610
0
Votes
Undo
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

This file is an XG file. There are three major formats of MIDI files: GM (GM1 and GM2, soon to add GM 2.0); GS; XG

Each one has specific things it uses to set percussion.

Here's a screenshot from my instrument switcher which shows the breakdown of what's what in this file.
It has 3 GM SYSEX commands, and an additional 82 XG SYSEX commands (one being the XG System On/Reset).
It has percussion on 4, 5, and 7.

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. Here's my code comments for checking this

// 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


XG sets percussion with bank selects MSB = 127 (normal percussion kits), MSB = 126 (SFX percussion kits), MSB = 64 (individual SFX bank)

[quotePost](strange that uncompressed midi files cannot be uploaded :D )[/quotePost]
We all agree ;)
2 days ago
·
#14609
1
Votes
Undo
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...


Thanks.
VLC only plays file type 1.
Musescore shows only one track of type 0, two tracks of type 1 and does not open type 2
Audacity shows both tracks of the 3 files in the same way

would there be any reason to indicate an error when a file type 0 has more than one track? because it could just be opened as type 1
2 days ago
·
#14608
1
Votes
Undo


Thanks, it has really big midi files 1.4 mb

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
(strange that uncompressed midi files cannot be uploaded :D )
3 days ago
·
#14599
0
Votes
Undo
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...
3 days ago
·
#14598
0
Votes
Undo
For LARGE MIDI files, you can have a look here:
http://www.midimusicadventures.com/queststudios/midi-soundtracks/complete-soundtracks/
These are soundtracks from old PC games made by Sierra/Quest Studios.

Some of the files are a collection of the entire soundtrack from a game merged in to one giant file. ROBIN-GS is 446 KB. Note though that some of the files may not be 100% "correct", as they may have artifacts left over from the original merging process (like invalid drum kits, or a mismatched MIDI file format mixed in with the others [old MT-32 vs GM vs GS]) so don't be alarmed if you come across something that doesn't look right, because there's a good chance it's not ;)
4 days ago
·
#14595
0
Votes
Undo
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.


That's what I was thinking but I wasn't sure if it was correct, it's still much better than just saying it's a midi type 2 which isn't supported like musescore or timidity does.
4 days ago
·
#14590
0
Votes
Undo
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.

The official specification for Standard MIDI Files doesn't do a very good job of explaining the difference between Type 0, 1, and 2 MIDI files. The MIDI Technical Fanatic's Brainwashing Center page that describes Type 0, 1, and 2 MIDI files has more details. But it might still take a while of looking at example MIDI files and experimenting with MIDI file players and editors to get a good understanding of the differences.

Unfortunately, the Type 2 MIDI file format is so rare or non-existent that most MIDI software doesn't support it at all. I can give you my idea about how I think it should work, but be aware it is mainly just something that MIDI nerds like to talk about.


How do you know which sequence to play?
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.

If I were creating a MIDI file editor and I wanted it to open Type 2 MIDI files, then right after the user selects the file in the Open dialog box, I might want it to show a list of the tracks and let the user pick which one to work on. Then the editor would open that track and show it the same way it would show a Type 0 MIDI file. Later, the user could go back to the special track list window to add, remove, or re-order individual tracks and save the overall Type 2 MIDI file.

Alternatively, when the user opens a Type 2 MIDI file, I might want it to add all the tracks one after another on the same timeline in the editor, but show a special dividing line between tracks, and restart the timeline number labels at 0 seconds or bar 1 at the beginning of each track.

If I were creating a MIDI file player and I wanted it to open Type 2 MIDI files, I would probably load all the tracks as separate items in a playlist, so it can just play them one after another. I would also let the user remove or re-order the items in the playlist without affecting the original Type 2 MIDI file, only the playlist would be affected.


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.
4 days ago
·
#14589
0
Votes
Undo
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.


http://midi.teragonaudio.com/tech/midifile.htm

How do you know which sequence to play? In the case of the game file, it is special because it is controlled by the game itself. Does it have anything to do with this?
http://jac.michaeldrolet.net/SCS_10_Help/scs_options_mid_msc.htm
5 days ago
·
#14586
0
Votes
Undo
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 [...]
Yes, this empire.mid is exactly the same as the one from the previous thread Jason mentioned.

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.
Note that the only places the tick position gets reset to zero is when a new track starts, so that is perfectly normal.

However, as you mentioned, near the end of the first track, there is a message to start a channel 3 G note that is never ended. And in the second track, the only note message that exists at all is a message to end the same channel 3 G note. Those unbalanced note messages are abnormal in usual circumstances.

Since these tracks are presumably MIDI snippets that a video game can switch between, it might possibly make sense to have a note split across snippets, but it would have to be handled carefully to avoid leaving a note stuck sounding. Alternatively, it could also just be some editing glitch that got left in the file.

doesn't it play all 3 tracks at once?
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.

In the example Type 2 MIDI files extracted from Star Wars: Dark Forces, the tracks appear to be music snippets the game can switch between depending on the action happening in the game. According to my understanding, this seems similar to the idea behind a standard Type 2 MIDI file, but is a little bit different.

For example, I believe a standard Type 2 MIDI file should have appropriate set up messages at the beginning of every track. However in these example Type 2 MIDI files extracted from Star Wars: Dark Forces, only the first track in each file appears to have Program Change messages to set up the instrument sounds for each channel. Supposedly the other tracks would eventually be played at some point after the first track had started and reuse the same instrument sounds that were set up.
  • Page :
  • 1
  • 2
There are no replies made for this post yet.
Be one of the first to reply to this post!