XMPlay MIDI plugin

Started by Ian @ un4seen,

Zarggg

The FluidR3 GS soundfont causes XMPlay to crash for me. Just a caveat.

Rich Nagel

#21
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).

Ian @ un4seen

Quote from: NichelCan 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/

Quote from: ZargggThe 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.

Quote from: Rich NagelViewing 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.

Quote from: Rich NagelWhen 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

#23
Quote from: Ian @ un4seenThat 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:

Quote from: Rich Nagelusually 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.

Brian

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.

stanton

#25
hmm this is good and all but.. umm made my midi i make sound funky o.O
less bass :( but other than that seems to work great..
it did make my edited ver of the impmarch starwars theme for Vader sound sooo much better my god! im in love!

not long ago i learned its easyer to make music in midi formate than mp3 fl studio isnt that good.. i like the trackers out there.. and yea.
midi plugin is better than the winamp.. need controles for it.. kinda like the eqlizare and things..

Rah3D

Quote from: BrianThe 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.

You need one to play MIDI in Windows Media Player, too - you just don't have to set it manually, because it comes with Windows. Look for "C:\Windows\system32\gm.dls".

Rich Nagel

#27
As Rah'Dick posted, many sound card use Windows native DirectX (more specifically, DirectMusic) for their MIDI music playback. DirectMusic is a software synthesizer (similar to how the XMPlay MIDI plugin operates), but uses DLS sound banks to generate the resulting music with. DLS is a proprietary format of Roland, and stands for "Downloadable Sounds"... similar to the CLI's/EMU's SF2 format SoundFont sound banks. Many Roland MIDI hardware devices can load DLS format sound banks, just like many CLI/EMU hardware devices can load SF2 format "soundfont" sound banks (as well as the older "SBK" format).

Now, to throw a small cog in the wheel LOL, some PCs have a sound card (or an onboard chip on the motherboard) which is a wavetable MIDI sound card or daughterboard (example: the older CLI "WaveBlaster", as well as the Roland "Sound Canvas" series of daughterboards and standalone MIDI devices). These wavteable cards do not require the loading of a sound bank, as they have real recorded samples stored in an onboard ROM contained on the board (hence, these cards don't require an SF2 or a DLS sound bank to operate).

Anyways, think of it like this: A sound bank consisits of numerous small real recorded clips of real instruments (as an example, a single trumpet playing one note for one second). The software (or hardware MIDI device) plays back this sound sample at different pitches and durations based on the MIDI file that it is currently playing, generating the resulting music/song that you hear.

stanton

Quote from: Rich NagelAs Rah'Dick posted, many sound card use Windows native DirectX (more specifically, DirectMusic) for their MIDI music playback. DirectMusic is a software synthesizer (similar to how the XMPlay MIDI plugin operates), but uses DLS sound banks to generate the resulting music with. DLS is a proprietary format of Roland, and stands for "Downloadable Sounds"... similar to the CLI's/EMU's SF2 format SoundFont sound banks. Many Roland MIDI hardware devices can load DLS format sound banks, just like many CLI/EMU hardware devices can load SF2 format "soundfont" sound banks (as well as the older "SBK" format).

Now, to throw a small cog in the wheel LOL, some PCs have a sound card (or an onboard chip on the motherboard) which is a wavetable MIDI sound card or daughterboard (example: the older CLI "WaveBlaster", as well as the Yamaha "Sound Canvas" series of daughterboards and standalone MIDI devices). These wavteable cards do not require the loading of a sound bank, as they have real recorded samples stored in an onboard ROM contained on the board (hence, these cards don't require an SF2 or a DLS sound bank to operate).

Anyways, think of it like this: A sound bank consisits of numerous small real recorded clips of real instruments (as an example, a single trumpet playing one note for one second). The software (or hardware MIDI device) plays back this sound sample at different pitches and durations based on the MIDI file that it is currently playing, generating the resulting music/song that you hear.
true... so true. um i use a nfroce 6channel sound card..
it uses DirectX/music
and useing this addon pluse soundfonts for xmplay seem to make it sound little less umm what's that word oh yes computer genorated.. like an old 95 or older.... any ways i got meh midi's sounding great now after missing around with teh files ^.^

rxs2k5

hi pros,

I added the midi plugin in and downloaded the Chorium, but XMPlay gave me an error when i tried to play one of the demos in the folder, it said this " MIDI error " "Can't load soundfront!". But when I double click on the midi itself, it played in windows media player.

Any advices ??

Brian

#30
Thanks very much for the helpful explanations. I found gm.dls in C:\Windows\System 32\Drivers.

rxs2k5 - you need to go to the plugin config and browse to the Chorium font.

Ian @ un4seen

Quote from: Rich Nagel
Quote from: Ian @ un4seenThat 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).

Yep, it wasn't falling back to the main soundfont properly. It should be ok now.

Quote from: Rich NagelThe SF2 has one patch contained in it, GM patch #22 - Harmonica (0 based patches), set for Bank 1.

The patch 22 in HOHNER.SF2 is actually set in bank 0, but so long as the main soundfont doesn't have a patch 22 in bank 1, the plugin will fall back to it :)

Rich Nagel

#32
Quote from: Ian @ un4seenYep, it wasn't falling back to the main soundfont properly. It should be ok now.

Working perfectly now :thumbsup: -:)


Quote from: Ian @ un4seenThe patch 22 in HOHNER.SF2 is actually set in bank 0, but so long as the main soundfont doesn't have a patch 22 in bank 1, the plugin will fall back to it :)

My mistake... been quite some time since I created that soundfont <BG>. Anyhow, all seems to be working fine now... the harmonica is coming from the HOHNER.SF2 soundfont file, while the accoustic guitar is coming from the main base SF2 -:)

Knurek

Some other suggestions:

1) Would it be possible to detect FM MIDI files and pass them to Adplug (like you already do with Adlib S3Ms)? I've uploaded an archive that has GM and FM versions of the same music.

/Edit: I've actually tried to play them with Adplug, and surprisingly they don't play at all... Hmm, I'm gonna look for other examples then...

2) What about Timidity (http://sourceforge.net/projects/timidity) soundfonts support (GUS patches)? While the original Gravis patches aren't all that good, there are some good compilations (EAWPats, FreePats).

3) Any chance for adding support to other MIDI formats that in_midi support (KAR, HMP, HMI, XMI, MUS, CMF)? Not sure if they are documented somewhere, and I guess I can always convert them with in_midi (I think), so it's not that important.

Rich Nagel

#34
A couple of rather interesting SoundFonts with demo MIDIs that I created eons ago <G> (eventually I'll get around to uploading more of them, I have quite a few obscure SF2/MIDI creations such as these):

(Note: URLs are case-sensitive)

http://www.cmoo.com/snor/weeds/SoundFonts/Gatorade.txt
http://www.cmoo.com/snor/weeds/SoundFonts/Gatorade.zip

http://www.cmoo.com/snor/weeds/SoundFonts/PCBeep.txt
http://www.cmoo.com/snor/weeds/SoundFonts/PCBeep.zip

Download, unzip, read the text files, and play the MIDIs (enable autoloading of matching MIDI/SF2 filenames within the plugin's configuration window). Hehe, rather surprising, isn't it <BG>?

Rich Nagel

#35
Quote from: Ian @ un4seenBtw, I also plan to add support for stacking soundfonts.

That would be super! :thumbsup: -:) Man, this thing is almost gonna make internal PC EMU hardware obsolete <LOL>! -:)

Hehe, now all we need is a global Windows MIDI driver based on the plugin <G> -:)

rxs2k5

Quote from: BrianThanks very much for the helpful explanations. I found gm.dls in C:\Windows\System 32\Drivers.

rxs2k5 - you need to go to the plugin config and browse to the Chorium font.


Thank you very much, XMPlay rocks, small and much more powerful than winamp, keep up the good work, will spread these tools to everyone.

Ian @ un4seen

Quote from: Knurek2) What about Timidity (http://sourceforge.net/projects/timidity) soundfonts support (GUS patches)? While the original Gravis patches aren't all that good, there are some good compilations (EAWPats, FreePats).

Nope, I'm afraid there are no plans for that at the moment.

Quote from: Knurek3) Any chance for adding support to other MIDI formats that in_midi support (KAR, HMP, HMI, XMI, MUS, CMF)? Not sure if they are documented somewhere, and I guess I can always convert them with in_midi (I think), so it's not that important.

If they're not too different to standard MIDI files, then I guess it shouldn't be a problem to add support. You'll have to provide the test files though, as I don't have any of those :)

Quote from: Rich NagelA couple of rather interesting SoundFonts with demo MIDIs that I created eons ago <G> (eventually I'll get around to uploading more of them, I have quite a few obscure SF2/MIDI creations such as these):

...

Download, unzip, read the text files, and play the MIDIs (enable autoloading of matching MIDI/SF2 filenames within the plugin's configuration window). Hehe, rather surprising, isn't it <BG>?

Very nice :)

Note that you don't really have to unzip the files though, if you have the ZIP plugin ;)

Anyway... another update is up now, which lists the markers in the "Message" info and the instruments/patches used in the "Samples" info.

Lumina83

Actually, you do have to unzip them, otherwise XMPlay won't read the soundfont.

raina