19 Jun '13 - 20:14 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: 1 ... 30 31 [32] 33 34
  Reply  |  Print  
Author Topic: XMPlay MIDI plugin  (Read 225682 times)
winner
Posts: 193


« Reply #620 on: 25 Jun '11 - 05:58 »
Reply with quoteQuote

Edit: Well, I've tested only a few files and haven't detected much with my ears, except when testing the Back to the Future Theme (futureg.mid) from GaryW0001. With sinc interpolation active, at just over 19 seconds, the playback starts stuttering quite badly on my triple core AMD system. I had also noticed long ago that this particular midi happens to top out the active voices count at 300. I don't know, but if there is no fundamental flaw with this midi file, perhaps it makes a case for increasing the upper limit on active voices beyond 300?
OK, I have some more information. The trouble I see is when using Wasapi output (192000 hz, 32 bit). When I use DirectSound output, my system is able to cope, esp. with sampling down to 48000 hz. The stuttering issue would likely not occur for the majority of users who would likely use DirectSound. So Ian, I think a correction to cut voices for the interpolation feature is probably not yet advised until and if a lot of users find stuttering a problem with DirectSound and other output device choices besides Wasapi. I would though - if possible and not too much trouble - like to test a version of the midi plugin which allows even more than 300 voices, just to see what this would do for rendering quality and CPU usage.
Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #621 on: 28 Jun '11 - 15:33 »
Reply with quoteQuote

Yes, one of the cores is maxing out, though in Win7 it will show 33%, 1/3 of the processing power. Personally, I'd rather be able to hear everything, even if there were more than 300 voices in places, but cutting out some sounds might be a good general solution. BTW, is there a way to make XMPlay use more than one core at once? That might solve the issue for some users wanting to use interpolation.

XMPlay can use multiple cores for various things (decoding/rendering, visuals, file/tag scanning, etc), but those things will each use only one thread/core, eg. in your case the decoding/rendering is using a full core. Btw, some form of interpolation is always used; if the "Sinc interpolation" option is disabled, then linear interpolation is used Smiley

Anyway, here's an update to try, which should kill voices if the CPU requirements get too high during playback (not file writing)...

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

The "Active voices" display will go red for a second when any voices are killed. Let me know if you still get any stuttering.

Btw, a higher sample rate requires more processing/CPU, eg. doubling the rate will approximately double the required processing. So stuttering problems will be more dependent on that than the output system (DirectSound/WASAPI/etc), and lowering the sample rate should reduce the chances of stuttering regardless of the output system used. Increasing the buffer length can also help to overcome stuttering if the excessive CPU usage (or I/O delay) is fairly brief.
Logged
winner
Posts: 193


« Reply #622 on: 30 Jun '11 - 03:07 »
Reply with quoteQuote

XMPlay can use multiple cores for various things (decoding/rendering, visuals, file/tag scanning, etc), but those things will each use only one thread/core, eg. in your case the decoding/rendering is using a full core. Btw, some form of interpolation is always used; if the "Sinc interpolation" option is disabled, then linear interpolation is used Smiley

Anyway, here's an update to try, which should kill voices if the CPU requirements get too high during playback (not file writing)...

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

The "Active voices" display will go red for a second when any voices are killed. Let me know if you still get any stuttering.

Btw, a higher sample rate requires more processing/CPU, eg. doubling the rate will approximately double the required processing. So stuttering problems will be more dependent on that than the output system (DirectSound/WASAPI/etc), and lowering the sample rate should reduce the chances of stuttering regardless of the output system used. Increasing the buffer length can also help to overcome stuttering if the excessive CPU usage (or I/O delay) is fairly brief.
This version works as advertised on my system, as far as cutting sounds and preventing skipping, though when using the Wasapi output device/plugin, XMPlay's general tab shows output as a constant 192000, regardless of what I set for the input sampling rate, whereas with the other output devices, the tab shows an output rate that matches what I set for the sampling rate.
« Last Edit: 30 Jun '11 - 06:06 by winner » Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #623 on: 30 Jun '11 - 12:50 »
Reply with quoteQuote

...though when using the Wasapi output device/plugin, XMPlay's general tab shows output as a constant 192000, regardless of what I set for the input sampling rate...

Did you happen to have exclusive mode disabled? In that case, the WASAPI output plugin will use the device's shared mode format, as set in the Sound control panel.
Logged
winner
Posts: 193


« Reply #624 on: 1 Jul '11 - 01:27 »
Reply with quoteQuote

...though when using the Wasapi output device/plugin, XMPlay's general tab shows output as a constant 192000, regardless of what I set for the input sampling rate...

Did you happen to have exclusive mode disabled? In that case, the WASAPI output plugin will use the device's shared mode format, as set in the Sound control panel.
Yes, I was using shared mode as exclusive mode was not working. I've also discovered now that the "can't initialize WASAP output error" occurs in exclusive mode only when I set the output sampling rate above 48000 in XMPlay's Output dialog.
Logged
raygrote
Posts: 20


« Reply #625 on: 11 Feb '12 - 16:00 »
Reply with quoteQuote

Hi,
I'm pretty slow on these forums, just now realized that the midi plug-in revision 10f was out. And after somehow ending up with 2 midi plug-ins in different folders trying to share a config file, I can say that the sync interpolation does make a difference in most things under 4 megs or so. The ssmaller, the more difference it makes as you might expect as sometimes you are dealing with 11K samples or lower. It's almost as good as SFZ's option, I forget what it's called but it gets rid of many resampling artifacts.
I found a problem with the plug-in though, I just noticed it now, it's probably been here ever since the first version that had transposing. Nothing big though. If you're messing with a soundfont with release samples, and you transpose in XM Play, the release samples are just pitch shifted. the plug-in isn't using the correct samples for the notes like it does with the normal samples. I hope that made sense. It's not a big deal, as I normally transpose in a sequencer which would of course avoid that problem, and only two percent of fonts actually have release samples. Just thought I'd mention it.
Logged
winner
Posts: 193


« Reply #626 on: 11 Feb '12 - 17:48 »
Reply with quoteQuote

Hi,
I'm pretty slow on these forums, just now realized that the midi plug-in revision 10f was out. And after somehow ending up with 2 midi plug-ins in different folders trying to share a config file, I can say that the sync interpolation does make a difference in most things under 4 megs or so. The ssmaller, the more difference it makes as you might expect as sometimes you are dealing with 11K samples or lower. It's almost as good as SFZ's option, I forget what it's called but it gets rid of many resampling artifacts.
I found a problem with the plug-in though, I just noticed it now, it's probably been here ever since the first version that had transposing. Nothing big though. If you're messing with a soundfont with release samples, and you transpose in XM Play, the release samples are just pitch shifted. the plug-in isn't using the correct samples for the notes like it does with the normal samples. I hope that made sense. It's not a big deal, as I normally transpose in a sequencer which would of course avoid that problem, and only two percent of fonts actually have release samples. Just thought I'd mention it.
Hi Raygrote. Yeah, I think I know what you're talking about. This is not a problem with XMPlay. As I recall, the early Soundblaster cards pitch-shifted certain channels - by a third of an octave, I believe - according to hardware design. So, the midi files that were played with the Soundblaster cards had to use a soundfont with certain channels having the same-channel sound samples pitch-shifted inversely to produce proper sound when played. If trying to play songs with one of these pitch-shifted "release samples" (a soundfont with pitch-shifted samples), XMPlay does not do the corrective pitch-shifting as it was a particular quirk of the Soundblaster hardware and design.

This is my understanding and I may not be fully correct in the technicalities; someone may restate this if I'm a bit off base.
Logged
raygrote
Posts: 20


« Reply #627 on: 11 Feb '12 - 20:04 »
Reply with quoteQuote

Hi,
Now I'm a bit confused.
I'll explain it in a bit more detail just to make sure we're both on the same page. Maybe I'm just not understanding all of the technicalities.
Let's say I have some sustained piano notes and release samples for them. So, when playing a midi with XM Play, all is fine. The release samples play at their right pitch. But when I transpose, it's different. Let's say I go an octave down. So, a c4 gets transposed to a c3, and sure enough the sample mapped to c3 plays like it should. But when released, it plays the c4 sample, just shifted an octave down. I made an example soundfont if anyone wants to play with it, but it's nothing to be impressed about.
If I were to go in a sequencer and transpose, it would work fine. I'm just confused as to how a hardware limitation would have to do with that. I'm no expert on these hthings though.
Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #628 on: 14 Feb '12 - 14:19 »
Reply with quoteQuote

Please upload your example soundfont to reproduce the problem with here...

   ftp.un4seen.com/incoming/
Logged
kokocipher
Posts: 10


« Reply #629 on: 17 Mar '12 - 18:52 »
Reply with quoteQuote

feature request: Insert your own effect modules to midi controllers (eg. distortion, gainFX, flanger, Wah FXm, delay etc...)
How it looks: When you open the midiplugin config window, there will be a custom module menu.  volume, stereopan, modulationwheel, reverb, and chorus, will be grayed out so user can't mess with them.  The others-footcontroller(ctrl#4), effectcontroller1(ctrl#12), and effectcontroller2(ctrl#13) are available for customization.  Highlight the controller of your choice and then click on "config."  The config window will display the enabled module you have selected for that controller.  If you wish to replace it with another one, hit browse and select your module file. 

MIDI Controllers(according to Noteworthy Composer): For those that want to know the exact MIDI controllers used by the multi-point controller, the following controller names map to MIDI control numbers as shown:
Name----------------Controller #
Volume ------------------- 7
Stereo Pan--------------- 10
Breath Control ------------ 2
Modulation Wheel---------- 1
Foot Controller------------- 4
Portamento Time----------- 5
Data Entry MSB------------ 6
Balance ------------------- 8
Expression ---------------- 11
Effect Controller 1 -------- 12
Effect Controller 2--------- 13
Effects (Reverb) Depth------91
Tremolo Depth -------------92
Chorus Depth -------------- 93
Celeste Detune Depth------ 94
Phaser Depth-------------- 95
« Last Edit: 25 Mar '12 - 21:52 by kokocipher » Logged
Sub-Zero
Posts: 49


« Reply #630 on: 1 Jun '12 - 11:37 »
Reply with quoteQuote

Hi.  I've got a midi file that pegs the limiter on the midi plugin. It's audible to me with the soundfont I use (sgm 1.5), with clicks usually, or a dropped note sometimes. While it is an abusive corner case, I think a user settable peak limit option would eliminate the problem.
Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #631 on: 1 Jun '12 - 13:51 »
Reply with quoteQuote

Are you referring to a volume level limit or a voice count limit, eg. is there distortion because the level is too high or are notes being dropped due to a lack of voices to play them? If it's the volume level, you can lower the level via XMPlay's amplification level slider (or enable auto-amp), or if it's consitently too high with all MIDI files, you could lower the soundfont's gain setting in the MIDI plugin config. If there are dropped notes, the voice limit can be raised (up to 300) in the MIDI plugin config. Notes will also be killed if the MIDI plugin is struggling to render the MIDI file quickly enough, eg. due to insufficient CPU. When that occurs, the "Active voices" display in the MIDI mixer window will turn red.
Logged
Sub-Zero
Posts: 49


« Reply #632 on: 2 Jun '12 - 09:32 »
Reply with quoteQuote

Definitely a voice count limit.  I have the slider set to 300.  The file uses a rolling cymbal hit that clobbers some of the other instruments.. Sometimes it hits one that's still needed and it's audible. The drag is that it only happens sometimes.  My cpu is a core i7 920. at 300 voices, I don't get over 3% cpu.  The indicator never flashes red. Perhaps a higher or user-settable limit?  There's no distortion that I can hear. I have the auto gain set off and at 0.0%.
Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #633 on: 4 Jun '12 - 16:52 »
Reply with quoteQuote

OK. Please upload the troublesome MIDI file to have a look at here...

   ftp.un4seen.com/incoming/
Logged
winner
Posts: 193


« Reply #634 on: 4 Jun '12 - 17:20 »
Reply with quoteQuote

Definitely a voice count limit.  I have the slider set to 300.  The file uses a rolling cymbal hit that clobbers some of the other instruments.. Sometimes it hits one that's still needed and it's audible. The drag is that it only happens sometimes.  My cpu is a core i7 920. at 300 voices, I don't get over 3% cpu.  The indicator never flashes red. Perhaps a higher or user-settable limit?  There's no distortion that I can hear. I have the auto gain set off and at 0.0%.
Perhaps the cymbal sample is just the too loud or not very compatible with this particular song. If you can provide the midi file publicly as well, I'd be wiling to test with my samples. Also, do you know if the cymbal sample you have causes the same problem with other songs? It could be that the song itself has some fault in the way it was sequenced.
Logged
Sub-Zero
Posts: 49


« Reply #635 on: 5 Jun '12 - 10:22 »
Reply with quoteQuote

The file 'trekmedg.mid' is uploaded.  I'm sorry I haven't gotten back to this quickly, but now that I have opened my fat mouth, I'm having trouble reproducing it so I can upload a recorded example of it. bleh.. maybe I'm just hearing things.
Logged
winner
Posts: 193


« Reply #636 on: 5 Jun '12 - 23:29 »
Reply with quoteQuote

The file 'trekmedg.mid' is uploaded.  I'm sorry I haven't gotten back to this quickly, but now that I have opened my fat mouth, I'm having trouble reproducing it so I can upload a recorded example of it. bleh.. maybe I'm just hearing things.
Tested, sounds great on my system. Could've been several things, audio hardware state, other programs interfering, main reverb on top of midi reverb/chorus. I've heard similar things from time to time, but I don't know about this midi file in particular. BTW, this is one helluva fine midi file and I listen to it often.
Logged
Sub-Zero
Posts: 49


« Reply #637 on: 6 Jun '12 - 04:41 »
Reply with quoteQuote

Quote from: winner
Tested, sounds great on my system. Could've been several things, audio hardware state, other programs interfering, main reverb on top of midi reverb/chorus. I've heard similar things from time to time, but I don't know about this midi file in particular. BTW, this is one helluva fine midi file and I listen to it often.
Well the cut occurred right after or during one of those cymbal pans.. It cut into one of the voices being used for the melody line.. It was quite obvious.  It happened more than once too, but now I can't reproduce it.. I was using SGM 1.5 soundfont.  I'm sure the font matters because many instruments are polyphonic in the larger fonts.

md5
8d6242d62aaccaf277def0e5db4c45b5 *SGM-180 v1.5.sf2
Logged
Ian @ un4seen
Administrator
Posts: 15366


« Reply #638 on: 7 Jun '12 - 16:33 »
Reply with quoteQuote

Here's an update with an increased maximum voice limit of 400...

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

Let me know if you still have any trouble with it.
Logged
winner
Posts: 193


« Reply #639 on: 7 Jun '12 - 23:15 »
Reply with quoteQuote

Here's an update with an increased maximum voice limit of 400...

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

Let me know if you still have any trouble with it.
Thanks Ian! I think this may have solved some issues. I've tested this as well. At some point when playing the song, the MIDI Mixer dialog enumerates 397 active voices. The 400 limit seems to be sufficient for this file, but just barely.
Logged
Pages: 1 ... 30 31 [32] 33 34
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines