XMPlay MIDI plugin

Started by Ian @ un4seen,

Blue Ion

Speaking of Descent music, one of it's songs has a instrument that "slides" up and down instead of changing instantly the instrument up and down.
I have uploaded the file with the name D2_01.MID.
You can hear this at the very beginning of the song caused by the New Age Pad.
Other players plays this file correctly and seems independent of the soundfont in use.

Oddly, this didn't happen on previous versions though I can't remember which.

Quote from: DThank you for this plugin, Ian! I've been waiting something like winamp's MIDI plugin. But winamp's plugin supports some more formats like HMP (e.g. music from Descent game). Can you add support for this format?

http://www.mirsoft.info Has all the game mids you can think of, and more (there are a truck load of remixes too) so you don't have to rip it.

PS: I agree with the per instrument volume adjustment. I use a lot of different soundfonts and it's annoying having some instruments too loud and other too quiet.

Ian @ un4seen

Quote from: Blue IonSpeaking of Descent music, one of it's songs has a instrument that "slides" up and down instead of changing instantly the instrument up and down.
I have uploaded the file with the name D2_01.MID.
You can hear this at the very beginning of the song caused by the New Age Pad.
Other players plays this file correctly and seems independent of the soundfont in use.

Oddly, this didn't happen on previous versions though I can't remember which.

The slides are due to the file using portamento effects. The first MIDI plugin release didn't support them, and neither do the other players that you've tried by the sounds of it :D

Blue Ion

Impressive...
 :o
Creative, windows, alsa, gravis ultrasound midi drivers, Synthfont and who knows what others, played the thing without the portamento effect.

I had an old Descent 2 demo and neither Ultrasound, nor General Midi or even Adlib (SB16 OPL3) played the portamento.
I've actually ripped the song from the game (in-game that is) and the effect is there...

After some more testing only timidity managed to save his butt (and of course XMPlay).

That has to be the most undocumented midi effect ever.
Well done and thumbs up!!  :D

Kulag

I have one (that I know of) midi file that plays about twice as fast in XMPlay as WMP/other players.

WMP11: 21 min, 28 seconds
XMP: 12 min, 53 seconds

That and for some reason, unlike the last time I tried it, I'm only hearing the right channel when I use XMPlay.

I uploaded it to the incoming FTP folder. The file is 'beethoven_symphony_no_9_in_d_minor_opus_125_choral_4th_movement_ode_to_joy.mid'.

Ian @ un4seen

I don't know about the "right channel" issue (you could check the XMPlay and soundcard balance), but the speed problem seems to be due to there being tempo events in the last track instead of the first track. I believe the standard states that tempo events must be in the first track. At least, that's what the MIDI plugin expects :)

mudlord

QuoteAfter some more testing only timidity managed to save his butt (and of course XMPlay).

That has to be the most undocumented midi effect ever.
Well done and thumbs up!!

It actually is a part of the official GM2 specs (as well as the GS/XG MIDI specifications). Another nice effect is low pass filter cutoff (some XG MIDIs I made are notorious for thier filtered lead saws and sines..... ;D. Lots of other XG MIDIs use these filters, as well as portamento)...

WonderSlug

Hello Ian.  Just wanted to say that the XM-MIDI plugin for XMPlay is an awesome piece of software.  They both are actually.

I've tried other software synth apps like Timidity++ and SynthFONT, as well as Windows Media Player with my Creative SB Live! and SF2s.

Too bad the Live! cards have that 32 MB sample limit which causes samples to not be loaded from large SF2s when a sizeable number of instruments are used by a MIDI file.

However, I now prefer XMPlay + XM-MIDI above all others and really don't have to worry about that anymore!   ;D

Nevertheless, while playing a bunch of MIDI files that I collected over the years, I've come across a MIDI file that causes XMPlay 3.4.1 + XM-MIDI (rev. 2) to crash upon placing the file in XMPlay's playlist. 

The file doesn't even start playing.  As soon as XMPlay (or is it the XM-MIDI plugin) begins reading the file's info, XMPlay crashes into a Dr. Watson memory dump and log file.  Because of this, I don't think it's the soundfont(s) I am using, but I fiddled around anyway, just in case, and the crash still happened.

This MIDI file is a rendition of Snap!'s "Rhythm is a Dancer" song.  It plays fine however in the other players, like I mentioned above.

I've uploaded a ZIP of the file into ftp.un4seen.com/incoming.  It is called "XMPlay_Crash.ZIP"

Maybe you can take a look at it and determine what in the MIDI file is causing the crash.

Thanks again for a great app and plugin!

Ian @ un4seen

Strange, it seems to be ok here :)

You say it's crashing when reading the info, so maybe it's another plugin that's trying (and failing) to do that before the MIDI plugin gets a chance. To find out, please upload the drwtsn32.log entry for the crash.

WonderSlug

#233
Quote from: Ian @ un4seenStrange, it seems to be ok here :)

You say it's crashing when reading the info, so maybe it's another plugin that's trying (and failing) to do that before the MIDI plugin gets a chance. To find out, please upload the drwtsn32.log entry for the crash.

Ok Ian.  Will do....

.
.
.


Ok, I uploaded the Drwtsn32.log file to ftp.un4seen.com/incoming

It is a file called "drwtsn32_XMPlay_Crash.log"

Here's my system specs:

OS: Windows 2000 Pro with SP4 and all Windows Updates as of June 26, 2007.
DirectX:  Microsoft DirectX 9.0c - June 2007 update
CPU: AMD Athlon XP 1800+
RAM: 1 GB DDR266 (2 X 512 MB DDR266 modules)
Audio:  Creative Soundblaster Live! 5.1 PCI
Driver:  Creative ctaud2k.sys version 5.12.2.252 (7/24/2002)

As for XMPlay and XM-MIDI, I tried to create as "pristine" a config of the app as possible. 

That means I removed all plugins except for XM-MIDI.
There's also no WinAMP DSP plugins either.
Only the reverb and equalizer built-in ones that come with XMPlay. 
I turned off the reverb and equalizer.
I also used XMPlay 3.4.1's default skin.
I made sure the playlist was empty before trying to open that problem MIDI file.


I also made sure to create as clean a OS environment as possible.  I removed as many unnecessary Windows processes as I could.  The running environment before XMPlay's startup was only about 20 processes, all of which were OS and system driver related (graphics, sound, mouse, etc.)  No background tasks.  Except for maybe the Task Manager, but that shouldn't cause any problems.

The crash still occurred, so it definitely appears related to XMPlay 3.4.1 and XM-MIDI rev. 2

As I stated, the crash also occurs no matter what SF2 I use, so it's not related to that I think.

Here are my XMPlay and XM-MIDI settings (that I figure matter regarding this issue):

Output
=====
Device: SB Live! Audio [D000]
Sample Rate: 48000  (crash still occurs if I use 44100)
Channels: stereo
Resolution: 16 bit
Buffer: 1.000 sec
Apply Sample Rate to all formats CHECKED ON
Downmix multichannel CHECKED OFF
Dithering CHECKED OFF
Noise Shaping CHECKED OFF

XM-MIDI rev. 2
============
Soundfonts: (really doesn't matter as it happens regardless of SF2 used)
Check for soundfont as same name as file CHECKED ON
Check for a partial match CHECKED OFF
Use on all banks CHECKED ON
Set cue points CHECKED OFF
Auto-detect channel 16 drums CHECKED ON
Auto looping: loop-point detected
Use loop end CHECKED ON
Reverb & chorus effects processing CHECKED ON



I hope all this helps.  Thank you again for taking the time to explore this issue and for creating such a great piece of software.

Ian @ un4seen

The drwtsn32.log confirms that it has apparently crashed in a plugin (or rather in a system call from a plugin), but unfortunately, the module filenames are missing from the log for some reason, so I can't tell for sure what plugin that is.

If you've not already done so, please try 3.4.2 and remove all other plugins (including XMP-CD/WMA/WADSP). If it still crashes, you could also try the "stuff" MIDI plugin build...

   www.un4seen.com/stuff/xmp-midi.dll

WonderSlug

#235
Quote from: Ian @ un4seenThe drwtsn32.log confirms that it has apparently crashed in a plugin (or rather in a system call from a plugin), but unfortunately, the module filenames are missing from the log for some reason, so I can't tell for sure what plugin that is.

If you've not already done so, please try 3.4.2 and remove all other plugins (including XMP-CD/WMA/WADSP). If it still crashes, you could also try the "stuff" MIDI plugin build...

   www.un4seen.com/stuff/xmp-midi.dll

Hey!  That "stuff" works!   :D

I replaced the XMP-MIDI.DLL rev.2 with the one in the "stuff" folder you listed above, and it works!  No more crashing with that MIDI file!

I'm playing it right now in XMPlay 3.4.1 as I type this reply.   ;D

Thanks again Ian!  You just clobbered another obscure bug!   8)

UPDATE:

Ian, the file still plays weird though in XMPlay.  It also plays "weird" in Timidity++ as well.  Both XMPlay and Timidity++ play it the exact same way audibly. 

However, it plays perfectly fine in WinAmp 5.35 and Windows Media Player 9.  SynthFONT plays it ok but not as well as WinAmp or WMP9.

From what I gather, this MIDI file's specs when viewed by Timidity++ show [XG][SMF][14ch]

I'm guessing it's a Yamaha XG format MIDI file and that's what could have been causing the crash initially, and is no longer causing it using your updated XMP-MIDI.DLL in the "Stuff" directory.

I figure if I find a Yamaha XG Soundfont file to load it will play and sound properly in XMPlay because of the way it sounds using only GM/GS soundfonts.  Or else, try to figure out how WinAmp and WMP are playing it properly.

Update 2 (2007-07-03):
Finally got the file sounding 100% correct in XMPlay.  I had to load the same main SF2 file in bank 127 as I was using for bank 0.  The MIDI file seems to be a converted GUS file and I guess the  conversion looked for a special synth bank 127.  Without that, it was falling back to the bank d0:0 (bank 128) drumkit I was using that was also mapped to bank 127.  This drumkit was only used in Timidity and XMPlay so that's why the "weird" play wasn't showing up when playing the file in WinAmp or WMP.

So, all is right with the world.  Consider the problem now solved and the case closed!   :D 8)

Ian @ un4seen

Quote from: WonderSlugHey!  That "stuff" works!   :D

I replaced the XMP-MIDI.DLL rev.2 with the one in the "stuff" folder you listed above, and it works!  No more crashing with that MIDI file!

Jolly good. That means the crash was probably caused by a marker without a name.

piovrauz

mmm, I just updated the MIDI plugin and discovered the little "amp", it's great! I've a question: is it possible to make it per instrument (sample in the sf2)? since some soundfont have some samples too loud? thanks.

Ian @ un4seen

What you could try is replacing the presets that you want to adjust with the same SF2 file. They will then be listed separately in the soundfont list, and so you can adjust the gain separately. Note only 1 instance of the SF2 file will be loaded, so this won't really use any more memory. It does seem a bit messy though - I think it'd be better to fix the soundfont in a soundfont editor :)

piovrauz

I'll give it a try.

I asked this because I don't like editing sf, since it can mess the finetuning of the sf itself. So I'd liked more a on player solution, but this one might be good too.

I'll let you know, thanks in advance.

winner

#240
Hello,

Ian and contributors, great job on this program and the newest midi plugin! With this midi plugin, XMPlay is at the top of my list of audio music players!! I was very thrilled when I saw the abilities of the midi plugin and saved settings. On a quick read of features, I had thought that soundfont settings could be saved also, according to file type, folder, and individual file. Alas, this isn't the case, but if soundfont settings could be saved like this, to autoload for playlist items, THAT WOULD BE AWESOME. PLEASE consider this as an improvement idea for future versions.

I have been unable to get the partial match method to work for autoloading soundfonts either. Can someone provide a little more help and/or example? THANKS!

Knurek

Quote from: winnerI have been unable to get the partial match method to work for autoloading soundfonts either. Can someone provide a little more help and/or example? THANKS!

Say, you have a soundfont named Chorium.SF2
If you name the midi files "Chori.Song.mid" it should get autoloaded for this file.

winner

Nope, doesn't work on my system, Windows 2000 SP4.

I am testing with the Jeux 1.4 soundfont (jeux14.sf2) placed in a folder with Jeux midis.

I had tried "jeux_espana.mid" for example and "jeux.espana.mid," but neither of these work. I have to use the full soundfont name, such as "jeux14.espana.mid."

Please someone help me figure out why this might be happening.

Thanks!

Ian @ un4seen

Quote from: winnerI am testing with the Jeux 1.4 soundfont (jeux14.sf2) placed in a folder with Jeux midis.

I had tried "jeux_espana.mid" for example and "jeux.espana.mid," but neither of these work. I have to use the full soundfont name, such as "jeux14.espana.mid."

Yep, that is how it is meant to work. The example given by Knurek isn't actually valid :)

When "Partial match" is enabled, it means that the MIDI filename doesn't have to exactly match the SF2 filename (minus the extensions), but the start of the MIDI filename must still match the SF2 filename, eg. "jeux14" in your example. So if you wanted the SF2 file to match all MIDI files that begin with "jeux", you would have to rename it to "jeux.sf2".

winner

Aha! Thanks Ian!

So the soundfont file name needs to partially match names of all the midi files, not the other way around.

DOH!

I had also inquired about the possibility of XMPlay being able to save soundfont settings per type/location/file, which would allow autoloading of channel variations too. I would like to hear a response when you have time, Ian. Still, with the present abilties of the midi plugin, I'm having a blast with XMPlay!

Ian @ un4seen

Quote from: winnerI had also inquired about the possibility of XMPlay being able to save soundfont settings per type/location/file, which would allow autoloading of channel variations too.

I'm afraid that's not currently possible (at least not via the "Saved Settings" options), as the saved settings options don't include input plugin settings. Maybe in future :)

winner

Of course this begs the obvious question of whether or not the soundfont save settings function could be written into the plugin for now instead.

Ian @ un4seen

I'd rather not waste time on a temporary "for now" system :)

I was considering replacing/expanding the "MOD" saved settings to cover input plugin settings for 3.4, but it didn't quite happen. I will probably look into it further when it's 3.5 time.

julian bre

Wanted to say the soundfont player is killer. Great job Ian. Was wonder if it would be possible to make xmplay except midi in from an external sequencer like sonar and use xmplay as a stand alone soundfont player?

Tsorovan

What's the point in that? Just use a sampler in SONAR or whatever sequencer you use. Most of them support .sf2s. Native Instruments Kontakt is not bad. You can even run it stand-alone without having to use a VST/DX host.