XMPlay MIDI plugin

Started by Ian @ un4seen,

kode54

SFZ should support FLAC, but you need to install the XMPlay FLAC decoder plugin. Possibly the latest version, if you already have an older version.

winner

#801
Quote from: bryccoCan you add support for FLAC? I downloaded a fairly large SFZ file (5 GB "Ivy Audio - Piano in 162") for a piano soundfont, and it won't work. I get this error when I try to load it:
I've tried loading the same soundfont and got the same result. At one time I had 24-bit wav files in sfz collections, which wasn't supported. Ian programmed a correction in the midi plugin to allow for this (see this post). I'm guessing the same thing needs to be done for flac files which have 24 or 32 bit resolution.
 
[[[EDIT]]] Perhaps I'm wrong and it's just that the sfz implementation doesn't support FLAC format yet. A commenter on the FLAC plugin page stated "good for 24 bits / 96k."

brycco

The FLAC plugin doesn't have any effect on the midi plugin.

Ian @ un4seen

Quote from: bryccoAlso, possibly a bug in the Lyrics/Karaoke display:

...

MIDI found here: http://www.trachtman.org/rollscans/RollListing.php

Please tell which particular MIDI file you're having the problem with, as there are many on that page. I tried a couple of them, but the lyrics vis didn't look the same as in your image.

Quote from: winner
Quote from: bryccoCan you add support for FLAC? I downloaded a fairly large SFZ file (5 GB "Ivy Audio - Piano in 162") for a piano soundfont, and it won't work. I get this error when I try to load it:
I've tried loading the same soundfont and got the same result. At one time I had 24-bit wav files in sfz collections, which wasn't supported. Ian programmed a correction in the midi plugin to allow for this (see this post). I'm guessing the same thing needs to be done for flac files which have 24 or 32 bit resolution.

That is indeed the case; the MIDI plugin supports FLAC-encoded samples with the help of the FLAC plugin, but only 16-bit currently. I will update it to support 24-bit FLAC samples too.

winner

Quote from: Ian @ un4seenThat is indeed the case; the MIDI plugin supports FLAC-encoded samples with the help of the FLAC plugin, but only 16-bit currently. I will update it to support 24-bit FLAC samples too.
Thanks, Ian! This will be very helpful for those like me who have their working soundfonts installed on a solid state drive and are looking for ways to reduce application footprints.

dsp2003

#805
Hello! :) Ever since I've found out the MIDI plugin actually supports XG MIDI, I began testing every single MIDI file and the soundfonts I had.

Sadly, only a couple of XG effects are actually working, and the most of instruments don't sound right (understandable limitation of the soundfont synthesis, since XG hardware or Yamaha's software synths are hybrid WaveTable+FM combos).

Any plans on implementing the rest of effects? I can post the comparison .ogg renders if needed. The current list of the soundfonts I use:

* Codename 'Merkin' (http://kaleidonkep99.altervista.org/soundfonts.html)
* Musyng Kite
* Timbres of Heaven GM/GS/XG
* GeneralUser GS SoftSynth
* Roland SC-55 (Sampled)
* XG Sound Set Re-Mapped (SoundMAX)
* WeedsGM3

P.S. I hope Yamaha's patents to XG will expire soon (or already expired, the technology itself is already ~25 years old).

Ian @ un4seen

Yep, although XG sysex is supported, the XG effect implementation isn't really anywhere near complete as the "variation" effects aren't supported; only the reverb and chorus effects are supported. There are no immediate plans to implement the "variation" effects, but they may well be in future. There are quite a lot of them, so if they do get implemented, it would probably be one at a time, ie. if there's demand for a particular effect.

dsp2003

Well, I don't know their exact names, but there is an obvious absence of distortion (compression?) (especially noticeable in connection with rock guitars), wah effect (bandpass/bandstop - a lot of trance/pop tracks are depending on this) and flanger. :)

Here are several complex tracks which utilize the most of them: http://wks.arai-kibou.ru/download/xgmidi-sample.7z

Ian @ un4seen

Thanks for the example files. They'll come in useful when the time comes to implement some XG variation effects :)

In the meantime, here's an update that adds support for 24-bit FLAC (and Wavpack/etc) encoded samples. It still only actually uses 16 of the 24 bits, so if you have the choice, it makes sense to use 16-bit samples to reduce disk usage and loading time.

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

This update also adds support for the lorand/hirand and locc64/hicc64 SFZ opcodes, which are used by the "Ivy Audio - Piano in 162" SFZ file. I looked around for other examples of loccX/hiccX opcodes being used, and found mention of locc1/hicc1, so those 2 are supported by this update too.

Large encoded samples (like those used by the "Ivy Audio - Piano in 162" SFZ file) can take some time to load, possibly resulting in stuttering playback if they're loaded during playback. So this update also adds a "Preload samples" option (in the plugin's config window) to have all needed samples loaded at the same time as the MIDI file is loaded. A "Loaded sample data" display has also been added to the "MIDI Mixer" window, which shows how much sample data is currently loaded.

winner

Quote from: Ian @ un4seenThanks for the example files. They'll come in useful when the time comes to implement some XG variation effects :)

In the meantime, here's an update that adds support for 24-bit FLAC (and Wavpack/etc) encoded samples. It still only actually uses 16 of the 24 bits, so if you have the choice, it makes sense to use 16-bit samples to reduce disk usage and loading time.

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

This update also adds support for the lorand/hirand and locc64/hicc64 SFZ opcodes, which are used by the "Ivy Audio - Piano in 162" SFZ file. I looked around for other examples of loccX/hiccX opcodes being used, and found mention of locc1/hicc1, so those 2 are supported by this update too.

Large encoded samples (like those used by the "Ivy Audio - Piano in 162" SFZ file) can take some time to load, possibly resulting in stuttering playback if they're loaded during playback. So this update also adds a "Preload samples" option (in the plugin's config window) to have all needed samples loaded at the same time as the MIDI file is loaded. A "Loaded sample data" display has also been added to the "MIDI Mixer" window, which shows how much sample data is currently loaded.
Wow, Ian, thanks! Again, here are some updates that really enhance the flexibility and performance of the midi plugin. The continuous improvements to this plugin are much appreciated.

ELP

#810
Wow, once more really great improvements for XMPlay-MIDI!
Slowly it is almost scary, Ian :D Simply unbelievable... :)
-
EDIT- New features works great.

winner

Here's a note of success.

Using Audacity and maximum FLAC compression, I was able to reduce the wave file set in the SteinwayGrand.sfz collection from 1.28 GB (.wav files) in size to .496 GB (.flac files). This is a reduction of 61% and SSD memory storage savings of 784 MB.

I did of course have to edit .wav instances in the SteinwayGrand.sfz script file to be .flac references.

XMPlay is right now plowing through a huge .zip file of fast ragtime piano tunes without a burp, stutter, or blink.

Great work!

brycco

#812
Quote from: Ian @ un4seen
Quote from: bryccoAlso, possibly a bug in the Lyrics/Karaoke display:

...

MIDI found here: http://www.trachtman.org/rollscans/RollListing.php

Please tell which particular MIDI file you're having the problem with, as there are many on that page. I tried a couple of them, but the lyrics vis didn't look the same as in your image.

Quote from: winner
Quote from: bryccoCan you add support for FLAC? I downloaded a fairly large SFZ file (5 GB "Ivy Audio - Piano in 162") for a piano soundfont, and it won't work. I get this error when I try to load it:
I've tried loading the same soundfont and got the same result. At one time I had 24-bit wav files in sfz collections, which wasn't supported. Ian programmed a correction in the midi plugin to allow for this (see this post). I'm guessing the same thing needs to be done for flac files which have 24 or 32 bit resolution.

That is indeed the case; the MIDI plugin supports FLAC-encoded samples with the help of the FLAC plugin, but only 16-bit currently. I will update it to support 24-bit FLAC samples too.

I attached a zip with a bunch of MIDI files. Basically, the lyrics viz doesn't render all the text readable. The font sizes can get wacky and there's no way to scroll, and re-sizing the window can mess with it big time.

Edit: Nice to see the 24-bit flac files supported! Is it normal for the samples to be flushed on every new MIDI file? Is it possible to keep the samples in memory so as to not require long waiting periods when switching MIDI?

Ian @ un4seen

The main issue with those MIDI files is that the MIDI plugin thinks the text contains lyrics due to the leading '/' characters (which is used to indicate a new line in karaoke files). I'll look into tweaking the lyric detection, so that the text gets shown in the "Message" info window instead of the lyrics vis window. I'll also look into adding some sample caching (all samples are currently unloaded after playing a MIDI file).

Ian @ un4seen

Here's an update that should fix those MIDI files' text being detected as lyrics.

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

Let me know if you still have the problem with any other MIDI files.

This update also adds sample caching, which keeps previously used samples in memory. The size of the cache can be set in the plugin's config window. The default is 100MB (you will want to raise that significantly when using the "Ivy Audio - Piano in 162" SFZ). The amount of cached data is included in the "Loaded sample data" display, in the form of "<in use> + <cached>". When a cached sample is needed to play a MIDI file, it will be removed from the cache, ie. it'll move from the "cached" amount to the "in use" amount. All of the "in use" samples will move to "cached" when the MIDI file is unloaded, if they fit. When the cache size limit is exceeded, the least recently used sample(s) will be removed.

winner

Quote from: Ian @ un4seen...This update also adds sample caching, which keeps previously used samples in memory. The size of the cache can be set in the plugin's config window. The default is 100MB (you will want to raise that significantly when using the "Ivy Audio - Piano in 162" SFZ). The amount of cached data is included in the "Loaded sample data" display, in the form of "<in use> + <cached>". When a cached sample is needed to play a MIDI file, it will be removed from the cache, ie. it'll move from the "cached" amount to the "in use" amount. All of the "in use" samples will move to "cached" when the MIDI file is unloaded, if they fit. When the cache size limit is exceeded, the least recently used sample(s) will be removed.
Awesome!! I was wondering what kind of strategy would be used in this implementation for removing cached samples from memory. This is pretty smart!

I assume that all cached samples are removed from memory when XMPlay is closed, right?

I think that caching ability is a great improvement for this plugin! I'll try it out and report results!

saga

QuoteI assume that all cached samples are removed from memory when XMPlay is closed, right?
Terminating a process also frees all its memory, so yes.

piovrauz

true saga, and xmplay doesn't create  any new process that it "forget" to close as some  other SW do, so the used memory is really freed up after xmplay is closed.

rmsoft1

#818
I think I found a bug. The drums, like crash cymbals or other instruments that are supposed to fade, don't work. Drum notes get cut off.... I set the Voice limit to the max but it still happens. any way to fix it?

Ian @ un4seen

To investigate what's going on, please upload a MIDI file that you're having the problem with here:

   ftp.un4seen.com/incoming/

Also state what soundfont you're using.

saga

Currently it is possible to replace individual melodic patches by patches from another soundfont. As far as I can see, if you want to use soundfont A for melodic patches and soundfont B for drums, you'd have to assign soundfont B as the soundfont with highest priority and then replace all 128 melodic patches manually with those from soundfont A. I guess this could be simplified a lot by also adding the drum sets to the preset list in the config window so that you can replace a single drum set if required.

Ian @ un4seen

It should be possible to set a soundfont to use for all drums or individual kits by first setting the "Bank" option to "d000". You can then use the "Add" option to use all kits in a soundfont, or double-click a kit number (in the preset list) to assign a soundfont to a single kit. In your example scenario, you would assign soundfont A to bank "000" and soundfont B to bank "d000".

saga

Oh, right, I completely overlooked that dropdown. That does the trick!

rmsoft1

#823
Quote from: Ian @ un4seenTo investigate what's going on, please upload a MIDI file that you're having the problem with here:

   ftp.un4seen.com/incoming/

Also state what soundfont you're using.

Sorry for the delay in response. Anyway, 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)


Special notice: That soundfont is a combination of two soundfonts. (Weeds GM, and a patch from Crisis[sitar]).
Note: I have the Gain for that specific soundfont set at around -1.5 when I added it to XMPlay.

Also I apologize for not using the FTP you provided but I saw it after I spent half an hour uploading files to my own server (Very crappy internet). I hope you don't mind. I can only provide a link to the SF2 since it isn't publicly available anywhere else.
I use the XMPlay-MIDI plugin to record/mix music for a game in development.
I should mention that this bug was not present in previous revisions.
Thank you in advanced.

siana

#824
----- EDIT: SORRY PLEASE DISREGARD -----

I overlooked the Apply button, which is why i couldn't load any SoundFont. My apologies!