foo_midi icon indicating copy to clipboard operation
foo_midi copied to clipboard

Feature request: store individual sample rates for each player

Open Mohamed00 opened this issue 9 months ago • 7 comments

Hi, would it be possible to add the ability to store sample rates for each individual player, as well as the global sample rate? I'd be interested in having this because I often listen to MIDIs with Sound Canvas VA, which introduces aliasing if it's run at 44 or 48 kHz that doesn't occur on hardware, most noticeable on instruments like bell trees or tambourines. Audio sample here. Setting the sample rate to 32000 Hz, which is what the hardware ran at, gets rid of that aliasing, but some other plug-ins I use don't support that sample rate, so it would be nice to run that plug-in only at 32000 Hz and leave everything else at 48000.

Mohamed00 avatar Mar 15 '25 12:03 Mohamed00

I'll look in to it.

stuerp avatar Mar 15 '25 13:03 stuerp

I'm leaning towards making most player related settings tied to the selected player. Why would it be necessary to keep the some of them global? It would also be a lot less work on the GUI + there really is no room for it in the dialog.

stuerp avatar Mar 15 '25 19:03 stuerp

So you're thinking it might be easier to make all playback settings apply to each player individually? If there isn't room for more options in the dialog, then yeah I could be fine with that. Generally I prefer to run everything at 48000 Hz, but that causes issues with this plug-in specifically, so I wanted to run it at 32000, and keep the rest at 48000 to avoid accidentally reducing the quality of soundfonts and other players.

Mohamed00 avatar Mar 16 '25 03:03 Mohamed00

Also, there's no easy, backwards-compatible way to identify an individual player but by its name: the built-in players have a fixed index but the VSTi's are added to the drop-down list as found.

The logic would be:

  • If a config for the specific (named) player can be found, it is used.
  • Otherwise, the global configuration is used.
  • Over time, each time a new player is selected, the named configuration list builds up during saving.

stuerp avatar Mar 16 '25 08:03 stuerp

This would be useful to have. I'd always assumed the VSTi would do a high-quality resample internally, but the difference is definitely noticeable in the samples provided. In addition to the ideas above, alternatively, could it be stored against the pre-set saved against the file?

MagikalUnicorn avatar Apr 28 '25 10:04 MagikalUnicorn

FYI, for those in the XG world, to match closest to the MU50 hardware, the output frequency should be 44,100KHz. See the notes on https://github.com/mamedev/mame/blob/master/src/devices/sound/swp00.cpp, which is the renderer used by the MU50, for the details.

MagikalUnicorn avatar Apr 28 '25 10:04 MagikalUnicorn

Actually this might be more important than I thought - if I default to 32000 for GS and then swap to XG, running the XG soft synth at 32000 actually downpitches the audio!

MagikalUnicorn avatar May 04 '25 10:05 MagikalUnicorn