Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to convert mt32 to GS and GM #107

Open
psi29a opened this issue Jan 2, 2015 · 15 comments
Open

Add support to convert mt32 to GS and GM #107

psi29a opened this issue Jan 2, 2015 · 15 comments

Comments

@psi29a
Copy link
Member

psi29a commented Jan 2, 2015

As readable in the xmidi.c code:

/* This is a default set of patches to convert from MT32 to GM
 * The index is the MT32 Patch number and the value is the GM Patch
 * This is only suitable for music that doesn't do timbre changes
 * XMIDIs that contain Timbre changes will not convert properly. */

and next

/* Same as above, except include patch changes
 * so GS instruments can be used */

Now the question is, do we keep this to XMI or do we extend this out in general? If someone has a mt32 midi file, we could accept this input and according to their wishes, either leave it as is (horrible sounding) or convert to GM or GS which would sound better!

I vote for extracting this out as additional functionality, so that people could convert mt32 files to gs or gm. I like this approach since we allow conversion of other midi like formats to midi.

Is there a header for mt32 files? so that we can disingenuous between them? Or is this something blind that we can only expose the options for?

@chrisisonwildcode
Copy link
Contributor

The bad news is that there is nothing in the MIDI file to distinguish that it is intended for MT32, looks like its one for the options (I would suggest using the convert options)

@psi29a
Copy link
Member Author

psi29a commented Jan 2, 2015

Sounds like a plan.

Make this general, not just for XMI. :)

@psi29a psi29a modified the milestones: 0.4.3, 0.4.2 Jul 26, 2017
@psi29a
Copy link
Member Author

psi29a commented Sep 23, 2017

Sounds like a good idea. :)

@sezero sezero modified the milestones: 0.4.3, 1.0 - Wishlist Nov 3, 2017
@chrisisonwildcode
Copy link
Contributor

um, trying to get my head in the game, what am I meant to be doing here?

@psi29a
Copy link
Member Author

psi29a commented May 19, 2018

in the xmi2mid, there is code to that converts midi destined for MT32 to GS or GM. So if you knew that your incoming midi file was MT32, it would do a best effort to convert it to something that matches either GS or GM so that it doesn't sound like crap when played back. This was important with XMI because most XMI sounds amazing with MT32 and crap when when playing back the GM version (games usually shipped with 2 or 3 versions).

https://github.com/Mindwerks/wildmidi/blob/master/src/xmi2mid.c#L654 <-- starting point

@ghost
Copy link

ghost commented May 20, 2018

Sierra made at least 3 games for native MT-32 which added GM support through a translation. They used a Key shift, a Volume adjust and one of four different Velocity maps for each instrument when translating. Translating the programmable memory timbres of the MT-32 is a more interesting project when it comes to finding a general solution. This is what Sierra used for their mapping:
https://github.com/wjp/freesci-archive/blob/master/src/sfx/mt32_GM_mapping/lb2map.txt
https://github.com/wjp/freesci-archive/blob/master/src/sfx/mt32_GM_mapping/pq1map.txt
https://github.com/wjp/freesci-archive/blob/master/src/sfx/mt32_GM_mapping/qfg1map.txt

The lists were generated with the following program:
https://github.com/wjp/freesci-archive/blob/master/src/sfx/mt32_GM_mapping/main.c

@ghost
Copy link

ghost commented May 20, 2018

If you want to detect an MT-32 midi file, scan it for its unique SYSEX.

@chrisisonwildcode
Copy link
Contributor

Thanks @r-lind this will be helpful.

Any chance anyone have a free mt-32 file I can use for testing?

@ghost
Copy link

ghost commented May 22, 2018

Perhaps here? http://www.midimusicadventures.com/queststudios/mt32-resource/utilities/
http://www.houseofsynth.com/roland-mt-32-to-general-midi-conversion-utility
http://www.houseofsynth.com/roland-gs-general-standard-to-mt-32-conversion-utility

@chrisisonwildcode please ask if there is anything, it's old code. Given time I would write a general OPL/MT-32/FB-01/"Amiga" instrument translation framework based on figuring out the intention of the composer when it comes to instruments and map this. OPL would probably prove to be the most exciting to do. A lot of composers probably used AdLib Visual Composer with its sound banks: http://www.vgmpf.com/Wiki/index.php?title=AdLib_Visual_Composer
Like in Eye of the Beholder I & II…

The use of a key shift, volume adjustment and some simple velocity maps to translate sequencer data MT-32<->GM, apart from simple instrument mapping has proven to be acceptable in a production environment during the 1990s.

This link may also prove interesting: https://nerdlypleasures.blogspot.se/2014/03/working-with-mt-32-yamaha-fb-01-midi.html

@chrisisonwildcode
Copy link
Contributor

so the instrument remap would be possible ... using a straight out mt-32 -> gm map. Trying to track down an extensive list of the sysex command set as some of the mt-32 midi files I've got my hands on have alot of sysex commands+data that I have no info on.

@ghost
Copy link

ghost commented May 30, 2018

@ghost
Copy link

ghost commented May 30, 2018

I once found what the undocumented SysEx the old Sierra games do, but can't remember. I think it resets the reverb. It's like programming a flat memory.

@farvardin
Copy link

in the xmi2mid, there is code to that converts midi destined for MT32 to GS or GM. So if you knew that your incoming midi file was MT32, it would do a best effort to convert it to something that matches either GS or GM so that it doesn't sound like crap

hello,

it would be great to be able to convert from MT32 midi to GM midi. I've tried the option, but the input file requires to be in XMI, and I don't know how to convert my MT32 mid into xmi, so I could make it play nicely with GM instruments only :)

@farvardin
Copy link

farvardin commented Jul 19, 2021

I don't know how to convert my MT32 mid into xmi,

I've just found out that midiplex (https://github.com/stascorp/MIDIPLEX) can convert midi into xmi, I've tried this and could made the conversion from MT32 to GM with wildmidi!

./wildmidi -g 1 /tmp/midiMT32.xmi -x /tmp/midiGM.mid

The instruments are not the same of course, but it can be of a great help for starting to remap a tune!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants