10 February 2013

Three Console MIDI Players

This weekend topic is MIDI player, of course there are more than just three MIDI players :-p in the crowded Windows world even for OSS. But I will cover three players as representative of three common synths.

The first is GUS patches based synthesizer, for this one I choose wildmidi. GUS patches is a collection of individual instrument sound which each parameter/effect stored in configuration text file. I made a little modification based on 0.2.3.5 version which make it less hardcoded and more portable as usual. So we have completely portable and small player (ok, player is small but patch vary).

Basically once we have a zipped patches follow these steps:

0. extract the patches :)
1. create share\wildmidi directory in the same place as wildmidi.exe
2. put all *.pat files into share\wildmidi above
3. copy its config file (usually *.cfg) in the same place as wildmidi.exe and rename to wildmidi.cfg
4. edit wilmidi.cfg above with notepad: put a line of dir before the first bank directive, if dir directive already exist and has value just remove its value (path).

downloads: portable wildmidi.exe (35 KB) and if you're interested, the modified sources

Next is SF2 (SoundFont 2) based synth which could be said as bundled version of GUS but more detailed (sometime a wave for a note sometime a wave for a range of notes). This may be good or bad, let say for editing individual pat is may simpler than having a dedicated SoundFont editor, but for distribution SF2 is handy and easy to setup. For this I choose fluidsynth which dedicated to be sf2 based player.

Fluidsynth itself is a bit complex, it include interactive console environment for many task, as a player (with focus for ease) this may be overkill. Fluidsynth seems not have option to load default sf2 file or sort of, so we may need create simple batch wrapper say fluidsynth.bat something like:

@%~dpn0.exe -i %~dpn0.sf2 %*

That is assuming you have soundfont named fluidsynth.sf2 at the same place as fluidsynth.exe

downloads: fluidsynth.exe (676 KB) and if you want to compile it yourself with all interfaces enabled, this patch may help


And the last one is player that use native synth, that is DirectX MS GS Wavetable Synth which use DLS bank (similar to SF2 in the way that it's a bundle). Well most audio players capable of playing MIDI usually use this method. To fit with previous choices is playsmf which use its own MIDI parser but with MS Synth as renderer. This tiny player of course doesn't need any setup or other dependencies, we could use file association or just drag and drop.

download: playsmf.exe (15 KB)

Obviously there is a worth mentioning player that try to do everything above and more (playing MOD, sort of bundled MIDI+Patches): timidity but I'm running out of time to build the latest version (2.14) which ask for fork doh. BTW my ffplay build (part of ffmpeg) is able to play MOD too.

links:
SF2
http://www.schristiancollins.com/generaluser.php
http://packages.debian.org/fluid-soundfont-gm
GUS
timidity-patch-gravis-1.0
http://www.onicos.com/staff/iz/timidity/link.html

we could use 7zip to open rpm or deb files from above links

No comments:

Post a Comment