XMPlay MIDI plugin

Started by Ian @ un4seen,

kode54

I just uploaded sotnpntn.mid, to be played together with two SoundFonts from here, with the ORCHESTRAL bank overriding the REST bank. The drum bank seems to be breaking on a few samples, somehow.

Ian @ un4seen

Quote from: rmsoft1Anyway, I am having issues with Several different midi Files available here: [RA_MIDI.zip]
all of them use the Soundfont available here: [RA_SF2.zip] (Sorry its kinda big)

Thanks for the test files. I tried to reproduce the problem with them, but they sounded fine, ie. I didn't hear any drums getting cut short. Is it only the final crash cymbal that's getting cut short? If so, check that you have the "Wait for end to decay" option enabled in the "Miscellaneous" options page.

Quote from: kode54I just uploaded sotnpntn.mid, to be played together with two SoundFonts from here, with the ORCHESTRAL bank overriding the REST bank. The drum bank seems to be breaking on a few samples, somehow.

It looks like that CompiFontREST soundfont doesn't include some drums from the standard kit, specifically it seems to be missing #37 (side stick) and #83 (jingle bell) that are needed by the uploaded MIDI file.

rmsoft1

Hello again, I have that option enabled, but the problem still exists. Here is an audio clip of what I hear.
AUDIO CLIP MP3
I lowered the sounds of the instruments and made the drums louder to make it easier to tell. each time the crash plays, it is cut short.

Ian @ un4seen

That's strange. This is what I'm hearing here (with the drum channel's level raised in the "MIDI mixer" window)...

   www.un4seen.com/stuff/RA_Title_v2.mid.mp3

Does the cymbal still get cut off if you set the drum channel to solo? If not, what "Voice limit" setting do you have in the MIDI plugin config, and does the MIDI mixer window show that limit being hit during playback?

rmsoft1

Quote from: Ian @ un4seenThat's strange. This is what I'm hearing here (with the drum channel's level raised in the "MIDI mixer" window)...

   www.un4seen.com/stuff/RA_Title_v2.mid.mp3

Does the cymbal still get cut off if you set the drum channel to solo? If not, what "Voice limit" setting do you have in the MIDI plugin config, and does the MIDI mixer window show that limit being hit during playback?

That is bizarre. I play the drums at solo and still experience the cut-off. (RA_Title_v2_DRUMSOLO.mp3)
and This is a screenshot of my midi Config window with the voice limit, set at 1000, by default. along with any other information in the photo that may help.

http://rmsoftware.tk/is2/6WMtwpBn/image.png

Ian @ un4seen

I notice in your screenshot that you're still using rev.13a of the MIDI plugin. Please try the latest build and see if it helps:

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

rmsoft1

Quote from: Ian @ un4seenI notice in your screenshot that you're still using rev.13a of the MIDI plugin. Please try the latest build and see if it helps:

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

ahhhaa! Thank you very much! the problem is solved.  ;D

mallo

Hey there, I'm mallo, and this is my first (possibly only lol) post.

I recently ripped soundtrack from a 2004 game "Kao the Kangaroo: Round Two" which was in MIDI format with SF2 soundfonts. At first I've used TiMiDity++ to convert the tracks to wav, but had a problem with one song which this plugin resolved. However, I've noticed another problem.

Here is a track converted with TiMiDity: link, and here's the same track converted with XMPlay MIDI Plugin: link. As you can notice, at as early as 0:04 one drum sound gets "turned off", and doesn't play for the rest of the track. Is that a problem with the plugin or the MIDI?

Also, here's the MIDI and here's its Soundfont.

winner

#833
Quote from: malloHey there, I'm mallo, and this is my first (possibly only lol) post.

I recently ripped soundtrack from a 2004 game "Kao the Kangaroo: Round Two" which was in MIDI format with SF2 soundfonts. At first I've used TiMiDity++ to convert the tracks to wav, but had a problem with one song which this plugin resolved. However, I've noticed another problem.

Here is a track converted with TiMiDity: link, and here's the same track converted with XMPlay MIDI Plugin: link. As you can notice, at as early as 0:04 one drum sound gets "turned off", and doesn't play for the rest of the track. Is that a problem with the plugin or the MIDI?

Also, here's the MIDI and here's its Soundfont.
I just replicated the same recording using XMPlay and the wav file sounds fine, just like your TiMiDity recording. Make sure you have the most recent files. Mine are these: XMPlay 3.8.1.15 and MIDI Plugin ver. 13k. At the output panel in the "File writing" section I have checked the box "Use source resolution."

Here is a link to the latest stuff versions of these files: http://www.un4seen.com/xmplay-stuff.php

mallo

It works now! It seems that I probably downloaded an outdated version by a mistake. Thanks for the help!

ELP

13 rev.K has now soooo many great improvements, optimisings and new features as opposite to 13.rev A. 8) Really brilliant, Ian :)
Maybe its time to classified rev.K as stable/main ? :P  :-[
because i think lots of user simply dont really recognise the stuff load thing.

Ian @ un4seen

Yep, the latest stuff should be made official soon. If anyone has any problems with it, now is the time to report them :)

lybxlpsv

#837
Any ideas why the drums cut off on my soundfont? doesn't seem to happen when testing it Vienna.
http://dl.lybxlpsv.com/files/sf2/SYXG50%20Standard%201.sf2pack sorry, my internet is slow so had to sf2pack the soundfont.
http://dl.lybxlpsv.com/files/sf2/garden1_v2.ogg how it sounds like on S-YXG50
http://dl.lybxlpsv.com/files/sf2/garden1_v2.mid

kode54

Release should be the maximum, or about 20 seconds, for non-looping drum keys. Also, you can specify the release parameters globally for the entire instrument, then override them for key ranges that need shorter releases.

My current preferred editor is Polyphone, at least a 64 bit build of it, since some of the more gigantic banks tend to make 32 bit builds run out of memory.

saga

I'm currently rewriting OpenMPT's MIDI export and debugging its output in XMPlay.
I've attached a file that should play 16 notes. However, XMPlay seems to ignore the last note on channel 2. Is this intentional?

ELP

#840
If this is the OpenMPT's MIDI exported file Saga, then the export is corrupt,
because in that Midi-export-File both last Note ON events (CH1 & CH2) has no NOTE OFF event

CH0(1):
Note ON 0x90 0x3C 0x7F | Delta Time 0x83 0x60 | ----""Note Off event  or NOTE ON with Vel 0 here is missing"" | End of Track 0xFF 0x2F | 00
CH1(2):
Note ON 0x91 0x3C 0x7F | Delta Time 0x83 0x60 | ----""Note Off event or Note ON with Vel 0 here is missing"" | End of Track 0xFF 0x2F | 00

++
If i load such a file for example into REAPER then the last note on event CH2 would be interpreted with an length of 1 tick (480ppq/125 BPM)
Which result in an Note length of 1 ms til end of track.

    +0    7199:  91 3C 7F
    +1    7200:  81 3C 00
END of:
    +0    7200   FF 2F 00

and the last Note on CH1
    +0    6719:  90 3C 7F
never ends ;)


Ian @ un4seen

Yep, as ELP says, the issue is that the final note-on event doesn't have a corresponding note-off event. The MIDI plugin ends playback at the final event (to remove any silence/padding), which is the final note-on in this case, so the final note doesn't get played. I'll make the plugin try to detect unreleased notes in the next update, and disable the end cropping then. In the meantime, I think it would be a good idea to add the final note-off event to avoid any ambiguity.

saga

Ah. I assumed that a MIDI player would always wait for the final "end of track" event anyway... But yes, good point, the missing note-offs should definitely be there.

Ian @ un4seen

Rev.14 of the MIDI plugin (up on the XMPlay page now) will disable the end space cropping when it detects that there are unreleased notes, so the final note in the "16 notes.mid" test file should now get played.

kode54

Any chance of publishing a specification of the minor differences that make a .sf2pack file? I've been in discussion with the developer of Polyphone about getting it supported there. He won't add BASS/BASSMIDI, but he may add a bunch of decoder libraries to load it, and possibly encoders as well to re-save it.

Ian @ un4seen

Yep, the sf2pack modifications are pretty simple. Firstly, "sfbk" in the RIFF header is replaced with "sfpk". Secondly, the sample data in the "smpl" chunk (and "sm24" chunk if it's 24-bit) is encoded and placed in the sf2pack file's "smpl" chunk (there's no "sm24" chunk). The rest of the file remains the same.

Corak

Quote from: Ian @ un4seenRev.14 of the MIDI plugin (up on the XMPlay page now) will disable the end space cropping when it detects that there are unreleased notes, so the final note in the "16 notes.mid" test file should now get played.

Hi. Just found horroful bug in r14 version of xmp-midi plugin:
On some instruments standard note-off are ignored, so they keep looping and spoil all sound.
On r13a (2014.08.28) all was perfect.

Examples (part of some unnormally looping tracks):
http://files.leraux.ru/Corak/Temp/Bugreport/XmPlay/xmp-midi/Track_11.mid
http://files.leraux.ru/Corak/Temp/Bugreport/XmPlay/xmp-midi/INTROTHM.mid
http://files.leraux.ru/Corak/Temp/Bugreport/XmPlay/xmp-midi/1.mid
http://files.leraux.ru/Corak/Temp/Bugreport/XmPlay/xmp-midi/4.mid

Listen it on r14 dll:
http://files.leraux.ru/Corak/Temp/Bugreport/XmPlay/xmp-midi/xmp-midi_r14.zip
and compare sound looping to r13a:
http://files.leraux.ru/Corak/Temp/Bugreport/XmPlay/xmp-midi/xmp-midi_r13a.zip

Standard Roland GS soundfont if needed:
http://files.leraux.ru/Corak/Temp/Bugreport/XmPlay/xmp-midi/Scc1t2.sf2

Ian @ un4seen

The problem appears to be that the MIDI files have some instances of multiple identical note-on events without the same number of corresponding note-off events. rev.13 of the MIDI plugin would release all instances of a note upon a note-off event, while rev.14 only releases one instance of a note upon a note-off event. I think most MIDI synths will do like rev.14 does, and there are some MIDI files that don't play correctly otherwise, but it does mean that some notes are left playing to the end in your MIDI files.

If you would prefer to have all instances of a note released by a note-off, here's an update that adds an XMPLAY.INI option for that:

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

Add a "NoteOffAll=1" line to your XMPLAY.INI file (under the "[MIDI]" line) to enable that.

Corak

#848
Understood, thanks! But still there's tons of midi (most from games, meeted more than 40 of examples with such "bad method") which is broken on listening on that way it now dealing with noteoffs in r14, but other synths - deal perfectly with them, only r14 method now loops some of them eternally.
 I think it's important option you must add (NoteOffAll=1) to Midi plugin that must be enabled by default (or disabled if you really think r14 method are really right) and everyone can easyly disable/enable it in midi plugin GUI menu. Everybody who listen to midi (X-Midi conversions mostly have such troubles) music from Games REALLY need it, and would be gratefull.

>rev.13 of the MIDI plugin would release all instances of a note upon a note-off event,
Right method, it was always used in custom midi files synths. Of course it's not so right for keyboard synths

Also Thank YOu very much - others fixes you made in r14 - make it sound much better now, better notes timing, volume balance and expression.

ELP

#849
as an explanation what Ian mean:
From Track_11.mid

1: 1:   0 |On Note    | chan=11    | pitch=C#6       | vol=108
        70 |On Note    | chan=11    | pitch=C#6       | vol=108
        71 |Off Note    | chan=11    | pitch=c#6       | vol=0

The same C#6 Note on the the same channel and port but only one Note Off
after the second C#6 Note On trigger.
Which is normally impossible if you play at one keyboard. Because before you can hit the same C#6 Key again the Key naturally always release... means Note off before the same Note on again..

Simplified said the Midi File itself for the example above (Track_11.mid) is actually corrupt if it is for playing one instrument  ;)
--
But it is right that normally for example hardware instruments release the first note on immediately if they receive the same note at the same channel again. So they normally never can play the first note(C#6 example above) infinite.
Nevertheless, those files actually wrong,if they should trigger instruments and not
other things like maybe controlling somewhat.