Without the need for SoundFont compatible hardware
This guide is obsolete for ScummVM since FluidSynth's inclusion in the Windows builds. Still works though, especially for other apps and games.
NOTICE!: (please read this first)
- This guide now covers Windows XP and Vista but it should also work on previous versions of Windows. Just let me know and we can confirm this. Also, if you've got suggestions or if you need help, just reply on this thread!
The guide deals with installing a virtual device driver and to pull that off successfully, you require administrator level access to your Windows system. Proceeding with the steps without it does no good.
Also, you are expected to be familiar with things like downloading and running an application, extracting compressed archives and deleting and renaming files, otherwise you might get stuck in details I might have overlooked.
- See TODO.
- Installing MIDI loopback
First we need to download and install the MIDI Yoke patch cable driver. This will take MIDI music data sent from ScummVM (or any other app) and loop it back to Windows so that we may route it further. Here are direct links to the NT/2000/XP versions:- Automated installation. (If unsure, pick this one.)
- Manual installation and installation instructions for XP.
- More download options and instructions are available on the MIDI-OX website at http://www.midiox.com/myoke.htm.
- Enabling MIDI loopback
Check that MIDI Yoke is properly installed by opening- Control Panel
- > Sound and Audio Devices
- > Audio
- > Sound and Audio Devices
For now, select Out To MIDI Yoke: 1. You may now skip to step 4.
(You can change back to regular Windows MIDI without uninstalling MIDI Yoke by selecting Microsoft GS Wavetable SW Synth.)
- Control Panel
- Enabling MIDI loopback on Vista
For whatever reason, the audio and MIDI device control panel has been scrapped in Windows Vista, so you need a 3rd party tool for changing your default MIDI device.
Joseph Cox's Vista MIDI Picker should get the job done.- Direct download here
- and additional info on the website at http://software.bootblock.co.uk/?id=vistamidipicker
(You can change back to regular Windows MIDI without uninstalling MIDI Yoke by selecting Microsoft GS Wavetable SW Synth.)
- Obtaining a software synthesizer
Next we need a software synthesizer to play the MIDI music sent from ScummVM. I've found rgc:audio sfz to be a most wonderful, no-nonsense kind of solution. It's free, simple and small.- You can download sfz at http://www.cakewalk.com/support/project5/sfz.aspx.
Now, the unfortunate extra step. If you have an ASIO soundcard, you may skip to straight to step 6. ASIO is a low-latency audio protocol available in professional or prosumer soundcards or through special third party drivers and if you didn't already know that and/or you haven't heard of ASIO before, it's pretty safe to assume you don't have it. So step 5 it is for you. - Setting up synthesizer I/O (consumer hardware)
You need SAVIHost to run sfz and you can either get:- The smaller version, or
- The slighty larger version, which comes with a virtual keyboard which lets you test sound output.
The synthesizer part of sfz is actually fully contained in the file called sfz.dll and it's meant to be used inside music sequencer applications (=hosts) as a plug-in. The sfz.exe is a primitive host application that enables sfz to function as if standalone, but sadly it only provides ASIO audio output. Since we are in step 5, we don't have ASIO, thus we don't have need for said sfz.exe. Therefore,
- delete sfz.exe
- rename savihost.exe to sfz.exe
Open Devices- > MIDI...
For Devices- > Wave...
When we later discuss saving and loading sfz settings, the PlugIn menu is where you find the Load..., Save and Save As... commands. The next step discusses the same issues as this one but is written for the original sfz.exe. You may now skip to step 7. - Setting up synthesizer I/O (ASIO hardware)
Double-click sfz.exe to run it. At this point we're just going to set up the devices, and memorize how to load and save settings because after we're done with this step, the instructions are going to focus on the sfz core, not the host app.
The configuration is straightforward: From MIDI, select the MIDI Yoke input with the number that corresponds to the output number selected earlier in Windows Audio settings. In this case, In From MIDI Yoke: 1.
For ASIO device and its Outputs, you probably know best yourself. The ASIO menu also lets you launch your driver's ASIO control panel for setting sample rates, buffer sizes etc.
When we later discuss saving and loading sfz settings, the File menu is where you find the Load Program (.fxp) and Save Program (.fxp) commands. - Sounds for your synth
Next we need a SoundFont or several to finally turn the MIDI data flow into audible music and to have some options to better suit different ScummVM games. SoundFont is basically a sound file with musical properties making them more complex than your plain .wav or .mp3. Regardless, the Internet is full of them, free and commercial. But what you're looking for is not the most specialized or original sounds but rather a solid, well-rounded, full General MIDI bank. That way you're prepared for whatever those crazy adventure game music composers had in mind when they decided to use a particular instrument patch and hopefully do justice to the original composition. I've picked two here for you to try out but nothing is stopping you from finding more - or replying and telling the rest of us about them for that matter.- Chorium Revision A ~27.5MB, small, cute and a very good GM SoundFont for its size. Direct download, RAR archive. No website, author welcomes suggestions and bug-reports to openwrld (at) kebi (dot) com.
- SGM-V2.01 ~235MB, I generally prefer the sound of this one over Chorium but it depends on the game. You can get it from the website at http://www.geocities.jp/shansoundfont/ but since the actual download is hosted on an annoying waiting site and the SoundFont requires special sfArk extraction, I took the liberty of mirroring the plain .sf2 file here, just to make things a little simpler. If you don't agree of my actions, by all means, go the official route.
Download the GM SoundFont of your choice and extract it to a folder, any folder. No harm in putting it where sfz itself is either. - Loading the sounds into the synth
Now, let us assume you have your sfz.exe running and the UI looks like this:
You can now drag and drop your SoundFont into sfz, or click the empty box next to FILE > to open the file selector. When a SoundFont is loaded, its file name will show in the currently empty box. Now, the last thing standing between enjoyable game music and crapfest is setting the MIDI drum channel. (If you don't do this, all the drum hits will be played with a piano sound). MIDI drums are generally played on channel 10 and that seems to hold true for BaSS and some LEC games I tried just now. So you first need to
- Select CHANNEL > 10
- Select BANK > 127
The rest of the settings you may optimally leave alone. If you're experiencing performance issues, running low on RAM or CPU, consult the sfzfaq.htm bundled with sfz. It gives valuable pointers on the MODE, QUALITY, EFFECTS and POLY settings. - Ready to rock
The setup is now ready. You just need to edit your ScummVM game settings to use Windows MIDI as the Music driver before starting to play. Just to recap, a working path to enhanced ScummVM MIDI music on Windows is as follows:
- ScummVM > Windows MIDI > MIDI Yoke > (SAVIHost) > sfz > SoundFont
Demos: Tips:
- See TODO.
- Day of the Tentacle: Distorted sound in the Chron-O-John cutscene.
- To quickly reset the SoundFont (in case notes appear stuck for one reason or another), just click the > next to FILE in sfz and reselect the file.
- chrisis for helping extend the guide to Windows Vista.
- 6.8.2010: Images hosted on a new server
- Introduction, what's the point of this guide? Who is it written for? Why choose this over plain Windows MIDI or Adlib/MT-32 emulation?
- Tips on SoundFont settings an such. Contributions also accepted.
- Probably countless little edits.