Author Topic: XMPlay MIDI plugin  (Read 495223 times)

Ian @ un4seen

  • Administrator
  • Posts: 20286
XMPlay MIDI plugin
« on: 9 Mar '06 - 17:04 »
Yep, the XMPlay MIDI plugin has finally appeared. It's a softsynth (ie. doesn't use MIDI hardware), and uses SF2 soundfonts. It's setup to use the Creative/Soundblaster soundfont by default, but any of the many SF2 soundfonts freely available on the 'net can be used (in the plugin config).

MIDI format 0 and format 1 files are supported, and the MIDI implementation supports all the main stuff, including the following events... note on, note off, key aftertouch, pitch bend, pitch bend range, patch/preset, bank select, tempo, volume, pan, modulation, expression, sustain/hold, reset all controllers, all notes off, all sound off.

The SF2 implementation is fairly complete, including support for multi-layered multi-region instruments, the volume and modulation envelopes, and the modulation and vibrato LFOs. It doesn't currently support the low-pass filter, but I may add that.

You'll probably want to enable the reverb to add a bit of extra depth to the sound. I may also add support for the MOD "surround sound" options.

Anyway, to get you started, here's a small (relatively) SF2 soundfont, with some nice example MIDIs included...

   Now available on the XMPlay page.
« Last Edit: 5 Apr '06 - 21:38 by Ian @ un4seen »

Torkell

  • Posts: 1169
Re: XMPlay MIDI plugin
« Reply #1 on: 9 Mar '06 - 18:07 »
* BoggyB downloads it

Possible bug #1: The Winamp MIDI plugin gets first go at the file. (was never a bug)

Possible bug #2: RMI files (I think MIDI with a different extension and slightly different structure) are not supported (samples files uploaded). (fixed)

Bug #3: While it plays your sample files, it does not play some of the MIDI files I have. They have been uploaded. (related to #2, fixed)

I have uploaded to incoming "boggyb2.zip", which contains the MIDI files that fail to play with this plugin, as well as some RMI files.
« Last Edit: 10 Mar '06 - 16:33 by BoggyB »

Knurek

  • Posts: 523
Re: XMPlay MIDI plugin
« Reply #2 on: 9 Mar '06 - 18:17 »
Anyway, to get you started, here's a small (relatively) SF2 soundfont, with some nice example MIDIs included...

Whoa, that does sound nice. Any other good, free soundfonts to consider? I'd like to compare at least two. ;)
Still, the example songs sound great (especially the two Falcom songs, even if they did sound better with original OPN/OPNA renditions), and the few MIDI files I listen to constantly (Peaceful from Azrael's Tear, Gabriel Knight, FF7 PC) sound niceish too.

It does bork a bit with Sam & Max *Complete* Soundtrack, available here: http://s-island.mixnmojo.com/

I think that the plugin doesn't support looping properly (starts from the beginning of the track). If you're interested, I can upload the files that sound wrong with it.

Also, is it possible to, dunno, automagically detect if a MIDI file uses GM or MT-32 and rearange the instruments or load another SF2 file? I guess not, but asking doesn't hurt (and most of the older PC games have MIDI files MT-32 compatible unfortunately).

Lumina83

  • Guest
Re: XMPlay MIDI plugin
« Reply #3 on: 10 Mar '06 - 01:51 »
Thanks very much for this plugin, Ian! I've been waiting a long time for this, as Winamp's MIDI plugin just doesn't cut it with XMPlay. Now all I need is for CaitSith2 to release a version of Highly Advanced that works properly with XMPlay and I can ditch Winamp for good.

It's played all the files I've thrown at it so far, though a handful play at the wrong tempo. Something to be fixed in the next release, perhaps?

Rich Nagel

  • Posts: 297
Re: XMPlay MIDI plugin
« Reply #4 on: 10 Mar '06 - 02:56 »
Great job, Ian! :thumbsup:

So far, using several larger commercial SF2s and some of my own compositions (as well as other MIDIs), this thing sounds great. It's quite close sounding to real AWE##/EMU-8### hardware, and definately rivals Timidity (Timidity does a pretty good job of MIDI playback using SoundFonts, but the reverb and chorus effects are really screwy sounding... more of a strange echo).

Anyhow, :thumbsup: ! -:)

(Edit) @All, dunno about the SF2 that's contained in the Chorium.exe file (I'm on a dialup), but if you can get your hands on Emu Technologies' 8MBGM.SF2 (commercial SF2 that used to be for sale - I actually bought the CD the day it was released - but is now usually offered on the driver CD with many SF2 compatable sound cards), that's a pretty decent sounding all-around sort of SoundFont.
« Last Edit: 10 Mar '06 - 03:04 by Rich Nagel »

Knurek

  • Posts: 523
Re: XMPlay MIDI plugin
« Reply #5 on: 10 Mar '06 - 05:58 »
Now all I need is for CaitSith2 to release a version of Highly Advanced that works properly with XMPlay and I can ditch Winamp for good.

What's wrong with Highly Advanced? I haven't had any problems with it (well, since I contacted the authors and they fixed the insane CPU usage thingy, that was around version 0.8 AFAIR). Well, it does show incorrect times on the playlist (song #2 has time of song #1 and so forth), but that's only a cosmetic thing - they are being played with correct times.

piovrauz

  • Posts: 967
Re: XMPlay MIDI plugin
« Reply #6 on: 10 Mar '06 - 08:29 »
Jan, U R Gr8!!!!!

This is the plugin I was waiting for long, so now I have the native MIDI plugin. Thaaaanks!

Suggested feature #1: since it uses SoundFonts, it would be nice if when loading a file it checks if there is a .SF2 with the same name, and load this instead of the "default" one.

Suggested feature #2: if you add sourround or DSP option, if possible I'd like them to be "only for MIDI", so they doesn't affect playback of, mod/mp3/flac...
« Last Edit: 10 Mar '06 - 14:19 by piovrauz »

Ian @ un4seen

  • Administrator
  • Posts: 20286
Re: XMPlay MIDI plugin
« Reply #7 on: 10 Mar '06 - 15:48 »
I have uploaded to incoming "boggyb2.zip", which contains the MIDI files that fail to play with this plugin, as well as some RMI files.

They're all RMI files :)

They're supported now.

Whoa, that does sound nice. Any other good, free soundfonts to consider? I'd like to compare at least two. ;)

I hadn't looked for any soundfonts until a few days ago, so I'd be interested to know what the best are too :)

Anyway, here are a few others I found...

http://www.tc.umn.edu/~davi0953/GUGS_v1_4_rp1.exe
http://www.ts-central.com/banksets/a340-sf.zip
http://sunsite.univie.ac.at/musicres/thammer/HammerSound/localfiles/soundfonts/FluidR3122501.zip

The last 2 are pretty big and are sfark'd, so you'll need this to decompress them...

http://www.melodymachine.com/sfark.htm

It does bork a bit with Sam & Max *Complete* Soundtrack, available here: http://s-island.mixnmojo.com/

Oops, I didn't consider files that long. Longer files are supported now.

I think that the plugin doesn't support looping properly (starts from the beginning of the track). If you're interested, I can upload the files that sound wrong with it.

Yep, please upload any dodgy files, and point out the dodgy bits :)

Also, is it possible to, dunno, automagically detect if a MIDI file uses GM or MT-32 and rearange the instruments or load another SF2 file? I guess not, but asking doesn't hurt (and most of the older PC games have MIDI files MT-32 compatible unfortunately).

I'd guess probably not, but if you upload one of the MT32 files, I'll check if there's anything that stands out. In the meantime, here's an MT32 soundfont you could try...

http://www.aep-emu.de/temp/MT32-8MB_V02a.zip

It's played all the files I've thrown at it so far, though a handful play at the wrong tempo. Something to be fixed in the next release, perhaps?

Yep, please upload the troublesome files to have a look at...

   ftp.un4seen.com/incoming/

Suggested feature: since it uses SoundFonts, it would be nice if when loading a file it checks if there is a .SF2 with the same nam, and load this instead of the "default" one.

Yep, that's supported now.

Btw, I also plan to add support for stacking soundfonts.

Haze

  • Guest
Re: XMPlay MIDI plugin
« Reply #8 on: 10 Mar '06 - 20:38 »
http://www.hammersound.net/ SF2 sets for download with plenty of reviews. Just make sure you pick sets complying to GM/GS standards. ;)

Knurek

  • Posts: 523
Re: XMPlay MIDI plugin
« Reply #9 on: 10 Mar '06 - 23:20 »
Yep, please upload any dodgy files, and point out the dodgy bits :)

Loops:

http://www.mirsoft.info/gmb/music_info.php?id_ele=MTc0MQ==

Compare XG - 1-10 Fighting.mid to the way in_midi replays it (set the looping in it earlier ;) )

MT-32 samples:

http://www.queststudios.com/quest/soundtrk.html
http://s-island.mixnmojo.com/loom.html
http://s-island.mixnmojo.com/mi2.html

The QuestStudios page has separate MP3 recordings of the MT-32 songs, so you can compare how the tunes should sound. Hope that helps somehow.

This might be helpful too: http://www.mirsoft.info/gamemids-help.php#formats


Rich Nagel

  • Posts: 297
Re: XMPlay MIDI plugin
« Reply #10 on: 11 Mar '06 - 04:03 »
This also may be of help, a list of the patch names and numbers for GM and MT32 instrument mapping:

General MIDI Patch Names/Numbers

0=Acoustic Grand Piano
1=Bright Acoustic Piano
2=Electric Grand Piano
3=Honky-tonk Piano
4=Rhodes Piano
5=Chorused Piano
6=Harpsichord
7=Clavinet
8=Celesta
9=Glockenspiel
10=Music Box
11=Vibraphone
12=Marimba
13=Xylophone
14=Tubular Bells
15=Dulcimer
16=Hammond Organ
17=Percussive Organ
18=Rock Organ
19=Church Organ
20=Reed Organ
21=Accordion
22=Harmonica
23=Tango Accordion
24=Acoustic Guitar (nylon)
25=Acoustic Guitar (steel)
26=Electric Guitar (jazz)
27=Electric Guitar (clean)
28=Electric Guitar (muted)
29=Overdriven Guitar
30=Distortion Guitar
31=Guitar Harmonics
32=Acoustic Bass
33=Electric Bass (finger)
34=Electric Bass (pick)
35=Fretless Bass
36=Slap Bass 1
37=Slap Bass 2
38=Synth Bass 1
39=Synth Bass 2
40=Violin
41=Viola
42=Cello
43=Contrabass
44=Tremelo Strings
45=Pizzicato Strings
46=Orchestral Harp
47=Timpani
48=String Ensemble 1
49=String Ensemble 2
50=SynthStrings 1
51=SynthStrings 2
52=Choir Aahs
53=Voice Oohs
54=Synth Voice
55=Orchestra Hit
56=Trumpet
57=Trombone
58=Tuba
59=Muted Trumpet
60=French Horn
61=Brass Section
62=Synth Brass 1
63=Synth Brass 2
64=Soprano Sax
65=Alto Sax
66=Tenor Sax
67=Baritone Sax
68=Oboe
69=English Horn
70=Bassoon
71=Clarinet
72=Piccolo
73=Flute
74=Recorder
75=Pan Flute
76=Bottle Blow
77=Shakuhachi
78=Whistle
79=Ocarina
80=Lead 1 (square)
81=Lead 2 (sawtooth)
82=Lead 3 (calliope lead)
83=Lead 4 (chiff lead)
84=Lead 5 (charang)
85=Lead 6 (voice)
86=Lead 7 (fifths)
87=Lead 8 (bass + lead)
88=Pad 1 (new age)
89=Pad 2 (warm)
90=Pad 3 (polysynth)
91=Pad 4 (choir)
92=Pad 5 (bowed)
93=Pad 6 (metallic)
94=Pad 7 (halo)
95=Pad 8 (sweep)
96=FX 1 (rain)
97=FX 2 (soundtrack)
98=FX 3 (crystal)
99=FX 4 (atmosphere)
100=FX 5 (brightness)
101=FX 6 (goblins)
102=FX 7 (echoes)
103=FX 8 (sci-fi)
104=Sitar
105=Banjo
106=Shamisen
107=Koto
108=Kalimba
109=Bagpipe
110=Fiddle
111=Shanai
112=Tinkle Bell
113=Agogo
114=Steel Drums
115=Woodblock
116=Taiko Drum
117=Melodic Tom
118=Synth Drum
119=Reverse Cymbal
120=Guitar Fret Noise
121=Breath Noise
122=Seashore
123=Bird Tweet
124=Telephone Ring
125=Helicopter
126=Applause
127=Gunshot


Roland MT-32 Patch Names/Numbers

0=Acou Piano 1
1=Acou Piano 2
2=Acou Piano 3
3=Elec Piano 1
4=Elec Piano 2
5=Elec Piano 3
6=Elec Piano 4
7=Honkytonk
8=Elec Org 1
9=Elec Org 2
10=Elec Org 3
11=Elec Org 4
12=Pipe Org 1
13=Pipe Org 2
14=Pipe Org 3
15=Accordion
16=Harpsi 1
17=Harpsi 2
18=Harpsi 3
19=Clavi 1
20=Clavi 2
21=Clavi 3
22=Celesta 1
23=Celesta 2
24=Syn Brass 1
25=Syn Brass 2
26=Syn Brass 3
27=Syn Brass 4
28=Syn Bass 1
29=Syn Bass 2
30=Syn Bass 3
31=Syn Bass 4
32=Fantasy
33=Harmo Pan
34=Chorale
35=Glasses
36=Soundtrack
37=Atmosphere
38=Warm Bell
39=Funny Vox
40=Echo Bell
41=Ice Rain
42=Oboe 2001
43=Echo Pan
44=Doctor Solo
45=School Daze
46=Bellsinger
47=Square Wave
48=Str Sect 1
49=Str Sect 2
50=Str Sect 3
51=Pizzicato
52=Violin 1
53=Violin 2
54=Cello 1
55=Cello 2
56=Contrabass
57=Harp 1
58=Harp 2
59=Guitar 1
60=Guitar 2
61=Elec Gtr 1
62=Elec Gtr 2
63=Sitar
64=Acou Bass 1
65=Acou Bass 2
66=Elec Bass 1
67=Elec Bass 2
68=Slap Bass 1
69=Slap Bass 2
70=Fretless 1
71=Fretless 2
72=Flute 1
73=Flute 2
74=Piccolo 1
75=Piccolo 2
76=Recorder
77=Pan Pipes
78=Sax 1
79=Sax 2
80=Sax 3
81=Sax 4
82=Clarinet 1
83=Clarinet 2
84=Oboe
85=Engl Horn
86=Bassoon
87=Harmonica
88=Trumpet 1
89=Trumpet 2
90=Trombone 1
91=Trombone 2
92=Fr Horn 1
93=Fr Horn 2
94=Tuba
95=Brs Sect 1
96=Brs Sect 2
97=Vibe 1
98=Vibe 2
99=Syn Mallet
100=Windbell
101=Glock
102=Tube Bell
103=Xylophone
104=Marimba
105=Koto
106=Sho
107=Shakuhachi
108=Whistle 1
109=Whistle 2
110=Bottleblow
111=Breathpipe
112=Timpani
113=Melodic Tom
114=Deep Snare
115=Elec Perc 1
116=Elec Perc 2
117=Taiko
118=Taiko Rim
119=Cymbal
120=Castanets
121=Triangle
122=Orche Hit
123=Telephone
124=Bird Tweet
125=One Note Jam
126=Water Bell
127=Jungle Tune

guest

  • Guest
Re: XMPlay MIDI plugin
« Reply #11 on: 11 Mar '06 - 07:47 »
Could XMPlay MIDI plugin display lyrics in message window  (as Winamp plugin do)?

Lumina83

  • Guest
Re: XMPlay MIDI plugin
« Reply #12 on: 11 Mar '06 - 11:15 »
Excuse my ignorance, but how do I upload files? I clicked on the FTP link and all I got was a link pointing to the parent directory. Do I need a special program, perhaps?

Dotpitch

  • Posts: 2870
Re: XMPlay MIDI plugin
« Reply #13 on: 11 Mar '06 - 11:55 »
Excuse my ignorance, but how do I upload files? I clicked on the FTP link and all I got was a link pointing to the parent directory. Do I need a special program, perhaps?

ftp://ftp.un4seen.com/incoming/
Windows Explorer is able to connect to the ftp-server, but you can use every other ftp-client you like ;). Just copy (upload) your file to "incoming". Notice that you can't see what's in the folder, so you can't check whether the file is actually there. Post somewhere if you've uploaded a file and Ian will take a look at it ;).

Lumina83

  • Guest
Re: XMPlay MIDI plugin
« Reply #14 on: 11 Mar '06 - 21:59 »
OK, I've uploaded the files now. Some of them are playing at the wrong tempo (usually too slow), and there are also some files in there where the drum kits can't be heard for some reason.

Ian @ un4seen

  • Administrator
  • Posts: 20286
Re: XMPlay MIDI plugin
« Reply #15 on: 12 Mar '06 - 14:13 »
Yep, please upload any dodgy files, and point out the dodgy bits :)

Loops:

http://www.mirsoft.info/gmb/music_info.php?id_ele=MTc0MQ==

Compare XG - 1-10 Fighting.mid to the way in_midi replays it (set the looping in it earlier ;) )

Can you upload the file? I can't be bothered with registering for the download :)

MT-32 samples:

http://www.queststudios.com/quest/soundtrk.html
http://s-island.mixnmojo.com/loom.html
http://s-island.mixnmojo.com/mi2.html

It's possible to detect MT-32 sysex events, but I believe those events change the way the patches/presets sound, so the MT-32/GM mapping doesn't really work (didn't for those "queststudios" files anyway). Those files probably need converting by hand. I guess the mapping would work ok when there are no MT-32 sysex events, but I don't see any way to detect that a file is actually MT-32 then :)

OK, I've uploaded the files now. Some of them are playing at the wrong tempo (usually too slow), and there are also some files in there where the drum kits can't be heard for some reason.

Yep, there was a problem with the default tempo when the MIDI file didn't set the tempo itself. The drums problem was due to the requested "kit" not being present in the Soundfont. It'll now fall back to the default kit.

Knurek

  • Posts: 523
Re: XMPlay MIDI plugin
« Reply #16 on: 12 Mar '06 - 20:10 »
Can you upload the file? I can't be bothered with registering for the download :)

Right, forgot about the filesize limit this site imposes on nonregistered users. Uploaded the whole archive just in case.

It's possible to detect MT-32 sysex events, but I believe those events change the way the patches/presets sound, so the MT-32/GM mapping doesn't really work (didn't for those "queststudios" files anyway). Those files probably need converting by hand. I guess the mapping would work ok when there are no MT-32 sysex events, but I don't see any way to detect that a file is actually MT-32 then :)

Mweh. Oh well, most of the MT-32 exclusive files have mp3/ogg rips along, so it's not that big of a deal... I take it that those sysex events would only work if xmp-midi would emulate the whole MT-32 (which would be kinda beside the point)?
As for the non-sysex files (ie Loom), they seem to work fine (at least finer than with GM soundfont, they sound like music, not like a cat in a heat). Bah, poxy midis, they're more inane than Modplug Tracker additions...

Rich Nagel

  • Posts: 297
Re: XMPlay MIDI plugin
« Reply #17 on: 13 Mar '06 - 02:17 »
Check out GŁnter Nagler's older command-line DOS utility "MIDIPat" at http://www.gnmidi.com/gnfreeen.htm . Haven't used that utility in quite some time, but IIRC it does a fairly decent job of converting/remapping the MT-32 patches to GM -:) Loads any MT-32 MIDI file, remaps the patches to GM, and then converts/saves the resulting remapped MIDI file.
« Last Edit: 13 Mar '06 - 02:20 by Rich Nagel »

Ian @ un4seen

  • Administrator
  • Posts: 20286
Re: XMPlay MIDI plugin
« Reply #18 on: 13 Mar '06 - 15:48 »
Loops:

http://www.mirsoft.info/gmb/music_info.php?id_ele=MTc0MQ==

Compare XG - 1-10 Fighting.mid to the way in_midi replays it (set the looping in it earlier ;) )

I see, there's a special marker to set the loop-point. Problem is the XMPlay plugin system currently doesn't really support custom loop-points, so I'll have to think about how best to add support for these :)

Nichel

  • Posts: 3
Re: XMPlay MIDI plugin
« Reply #19 on: 13 Mar '06 - 18:48 »
Feature request

Can you please add in the format field a bit more of information like ie: MIDI(GM),MIDI(GS),MIDI(XG) etc... ?

Zarggg

  • Posts: 1242
Re: XMPlay MIDI plugin
« Reply #20 on: 14 Mar '06 - 01:31 »
The FluidR3 GS soundfont causes XMPlay to crash for me. Just a caveat.

Rich Nagel

  • Posts: 297
Re: XMPlay MIDI plugin
« Reply #21 on: 14 Mar '06 - 02:55 »
A couple more feature requests:

Viewing the comments/copyright info for the loaded SF2 soundfonts (maybe within the F2 music file info window?).

When loading a custom SF2 soundfont with a matching filename for a MIDI file: If the instruments/patches are not found within the custom filename SF2, loading those missing instruments/patches from the main/base SF2 file (I have a lot of custom CLI SF2s and matching MIDIs that require a base SF2 be loaded (or rather, normally would use the samples contained in an AWE32/64's ROM, but could use a complete base GM compatable SF2), along with the custom SF2 - usually the custom SF2 utilizes banks 2 or higher).
« Last Edit: 14 Mar '06 - 02:59 by Rich Nagel »

Ian @ un4seen

  • Administrator
  • Posts: 20286
Re: XMPlay MIDI plugin
« Reply #22 on: 14 Mar '06 - 15:28 »
Can you please add in the format field a bit more of information like ie: MIDI(GM),MIDI(GS),MIDI(XG) etc... ?

Ok, I've added GS and XG detection. I've also now added support for multiple drum channels in GS files (those with the Chorium soundfont can hear the difference in the "Cowboy Bebop" example). XG isn't really supported though (no specific processing), so if you've got any dodgy sounding XG files, please upload them to have a look at...

   ftp.un4seen.com/incoming/

The FluidR3 GS soundfont causes XMPlay to crash for me.

Is that the one I posted above, or a different version? If it's the one above, please let me know if there's a particular MIDI file that triggers the crash, as I was unable to get it to crash. A drwtsn32.log entry would be handy too.

Viewing the comments/copyright info for the loaded SF2 soundfonts (maybe within the F2 music file info window?).

I'll have to think about that. If it's gonna support stacked soundfonts at some point, there could be quite a lot of them :)

I guess that could be done for matching custom SF2 files though.

When loading a custom SF2 soundfont with a matching filename for a MIDI file: If the instruments/patches are not found within the custom filename SF2, loading those missing instruments/patches from the main/base SF2 file (I have a lot of custom CLI SF2s and matching MIDIs that require a base SF2 be loaded (or rather, normally would use the samples contained in an AWE32/64's ROM, but could use a complete base GM compatable SF2), along with the custom SF2 - usually the custom SF2 utilizes banks 2 or higher).

That should now be possible. I've not tested it though, so let me know if it's not working properly.

Rich Nagel

  • Posts: 297
Re: XMPlay MIDI plugin
« Reply #23 on: 14 Mar '06 - 20:06 »
That should now be possible. I've not tested it though, so let me know if it's not working properly.

It doesn't appear to be working properly. I've uploaded a small sample (hohner.zip), it contains a custom SF2 (HOHNER.SF2) and matching MIDI file (HOHNER.MID).

The SF2 has one patch contained in it, GM patch #22 - Harmonica (0 based patches), set for Bank 1. The MIDI file has two patches (Harmonica and Acoustic Guitar - GM patch #25 - again, 0 based patches), with the Harmonica set to Bank 1 and the Acoustic Guitar set to Bank 0. The banks are set via each track settings, as well as via a controller entry for each track.

When played back with XMPlay setup for a complete GM compatable SF2 in conjuction with loading in the HOHNER.SF2 file, you can hear the harmonica (provided from the HOHNER.SF2), but not the guitar (provided by the master GM compatable SF2).


(Edit - correction) P.S. In my previous reply:

usually the custom SF2 utilizes banks 2 or higher

I meant to say "banks 1 or higher", as bank 0 is usually reserved for the base SF2.
« Last Edit: 14 Mar '06 - 20:12 by Rich Nagel »

Brian

  • Posts: 733
Re: XMPlay MIDI plugin
« Reply #24 on: 14 Mar '06 - 20:10 »
The plugin seems to work fine here, but I must confess to being rather ignorant in these matters - how come I need a sound font to play .mid files in XMPlay when I didn't need one to play them in Windows Media Player? As far as I can see, I didn't have a sound font on my system until I installed the Chromium one just now. Many thanks.