MIDI (General MIDI, MT-32, etc...)

Subforum for discussion and help with ScummVM's Nintendo Switch port

Moderator: ScummVM Team

Post Reply
User avatar
MAN-biker
Posts: 20
Joined: Wed Dec 28, 2005 1:30 pm
Location: Russia, Moscow

MIDI (General MIDI, MT-32, etc...)

Post by MAN-biker »

Thanks for adding support of MT-32 ROMs as internal MT-32 emulator.
Works fine.
But is it possible to add some soft-synth engine like this for General MIDI support?
Or use MT-32 ROMS (i prefer to use extended CM-32L ROMS instead of MT-32) for GM emulation?

About MT-32 emulation:
For example, I have tested Lands of Lore with CM-32L ROMS (renamed as MT-32 one, I'm not sure SCUMM can use CM32L_CONTROL.ROM+CM32L_PCM.ROM instead of MT32_CONTROL.ROM+MT32_PCM.ROM without rename) and in Windows - music is fine (not so great as at real GM, but sounds CORRECT).
But at Switch - midi mapping is incorrect like as it sounds when you try to play GM music on MT32.
I think, Wibdows build make some remappings to play GM midi on MT32 emulator.
Is it possible make the same remapping in SWITCH build like in Windows one?
rsn8887
Posts: 75
Joined: Sat Jan 23, 2016 1:56 am

Re: MIDI (General MIDI, MT-32, etc...)

Post by rsn8887 »

There is no general midi support on Switch. The operating system doesn’t have a midi driver like Windows does. Only Adlib and MT-32 emulation are supported. What settings are you using?
User avatar
MusicallyInspired
Posts: 1138
Joined: Fri Mar 02, 2007 8:03 am
Location: Manitoba, Canada
Contact:

Re: MIDI (General MIDI, MT-32, etc...)

Post by MusicallyInspired »

Does it not have Fluidsynth for SoundFont use? Throw a good SC-55 soundfont on there and it's as General MIDI as you can get.
User avatar
MAN-biker
Posts: 20
Joined: Wed Dec 28, 2005 1:30 pm
Location: Russia, Moscow

Re: MIDI (General MIDI, MT-32, etc...)

Post by MAN-biker »

About "correct" GM music in Lands of Lore with MT-32 emulation: tried now in windows build and... it' horrible like on Switch version and like it should be if you play GM/GS on MT-32 device :(
But Lands of Lore has support for MT-32 synth too in setup!
Is it possible to use mapper or MT-32 midi files for MT-32 if MT-32 device selected as synth in SCUMM VM?

Interesting: in Kyrandia 2 used General MIDI, but it sounds VERY good on MT-32 emulator!
MusicallyInspired wrote: Mon Feb 10, 2020 2:13 pm Does it not have Fluidsynth for SoundFont use? Throw a good SC-55 soundfont on there and it's as General MIDI as you can get.
Yep, why not to use it? For example, NSW GZDoom port use SF2 bank for MIDI music. Works fine.
Last edited by MAN-biker on Fri Feb 14, 2020 1:10 am, edited 3 times in total.
User avatar
MusicallyInspired
Posts: 1138
Joined: Fri Mar 02, 2007 8:03 am
Location: Manitoba, Canada
Contact:

Re: MIDI (General MIDI, MT-32, etc...)

Post by MusicallyInspired »

Incidentally, I've not had any problems using MUNT on the Switch. I thought soundfonts were working fine too. But I haven't used it in a while.
User avatar
MAN-biker
Posts: 20
Joined: Wed Dec 28, 2005 1:30 pm
Location: Russia, Moscow

Re: MIDI (General MIDI, MT-32, etc...)

Post by MAN-biker »

Finally, I discovered the reason why MT32 midi didn’t work correctly:
"...\LOLDATA\DATA\ENG\STARTUP.PAK" MUST to be present in THIS folder, EVEN if other localization folder in use (GER folder in case of my RUSSIAN one).
If SCUMM VM doesn't find "ENG\STARTUP.PAK", it will not do remap GM to MT32!
If SCUMM VM remaps MIDI to MT32, you should see "blinking LED" of MIDI messages (or messages on MT-32 LCD) and BLACK SCREEN for about 15 (!!!) seconds while game loads.


Required options:
music_driver=mt32
native_mt32=true

Optional:
mt32_device=null
gm_device=null
enable_gs=false
MT32 midi in Nintendo Switch build works fine too.
(But still troubles with "action" button - don't work, "LMB cick" works only with touchscreen)
rsn8887
Posts: 75
Joined: Sat Jan 23, 2016 1:56 am

Re: MIDI (General MIDI, MT-32, etc...)

Post by rsn8887 »

Fluidsynth library hasn't been ported to Switch because it has a ton of dependencies. That's why fluidsynth is not available on Switch, only Adlib and MT32.

What is the action button problem you mentioned? The touchscreen single finger tap-to-click and two-finger tap-to-click inputs are programmed to do exactly the same as pressing the B and A buttons on the joycon. So if tap-to-click works, then pressing B should also work.

The next version of ScummVM will have comprehensive keymapper options where users can remap controller buttons to any game actions as they like...
ccawley2011
Posts: 17
Joined: Sat Feb 03, 2018 3:45 pm

Re: MIDI (General MIDI, MT-32, etc...)

Post by ccawley2011 »

rsn8887 wrote: Thu Mar 05, 2020 4:57 pm Fluidsynth library hasn't been ported to Switch because it has a ton of dependencies. That's why fluidsynth is not available on Switch, only Adlib and MT32.
Have you tried using fluidsynth-lite? There's a Switch port of that here, although since I haven't tried it on the Switch, I have no idea what the performance of it is like.
rsn8887
Posts: 75
Joined: Sat Jan 23, 2016 1:56 am

Re: MIDI (General MIDI, MT-32, etc...)

Post by rsn8887 »

Thanks, I didn't know about Fluidsynth-lite. Indeed it works quite nicely on Switch! I updated the buildbot and pushed the code change. Unless I made some mistake, the next daily snapshot should have fluidsynth support.
User avatar
MusicallyInspired
Posts: 1138
Joined: Fri Mar 02, 2007 8:03 am
Location: Manitoba, Canada
Contact:

Re: MIDI (General MIDI, MT-32, etc...)

Post by MusicallyInspired »

Awesome!
rsn8887
Posts: 75
Joined: Sat Jan 23, 2016 1:56 am

Re: MIDI (General MIDI, MT-32, etc...)

Post by rsn8887 »

Of course I did make a mistake and the latest buildbot build from today still doesn't have it. It was missing one header file on buildbot.

I just added the missing header. So the next buildbot daily build should have it.
User avatar
p
Posts: 8
Joined: Tue Jul 04, 2006 4:42 pm

Re: MIDI (General MIDI, MT-32, etc...)

Post by p »

I have just learned about using a MIDI emulator to make my old ScummVM games sound better, hearing Sam & Max with this was a revelation.

But I have no clue how to get this working on the Switch. Can anyone help? I see it should be supported now with Fluidsynth-lite, but how do I add it? Do I have to compile it?

Thanks
rsn8887
Posts: 75
Joined: Sat Jan 23, 2016 1:56 am

Re: MIDI (General MIDI, MT-32, etc...)

Post by rsn8887 »

To try out General Midi via Fluidsynth or MT-32 via Munt, you just need to download the latest nightly build of ScummVM for the Switch from here: (click on the green number in the "ScummVM Latest" Column next to "Nintendo Switch"):
https://buildbot.scummvm.org/#/snapshots

Then make sure you put your soundfont files for fluidsynth and/or the Roland MT-32 roms for MT-32 into the /switch/scummvm/ folder. Then you need to enable fluidsynth or MT-32 in the ScummVM options and start a compatible game.
Post Reply