Skip to main content

Topic: Resampler plugin (Read 303920 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • lvqcl
  • [*][*][*][*][*]
  • Developer
Resampler plugin
Reply #325
SoX Resampler v0.8.3 mod and mod2 both don't create messages in foobar2000's console

It was removed in 0.8.0; they were added to help debugging, so I decided to remove them finally.
  • Last Edit: 21 May, 2013, 09:49:18 AM by lvqcl

  • Robertina
  • [*][*][*][*][*]
  • Banned
Resampler plugin
Reply #326
These messages had been helpful in cases in which the processing didn't meet the ear but was needed for other purposes.

Your resamplers are my favorite ones, so thank you for them, lvqcl.
This is HA. Not the Jerry Springer Show.

Resampler plugin
Reply #327
SoX Resampler v0.8.3 mod and mod2 both don't create messages in foobar2000's console

It was removed in 0.8.0; they were added to help debugging, so I decided to remove them finally.



Just wondering if it would be possible to get a mod or mod2 with passband down to 85? Thanks for considering this.

  • Dario
  • [*][*][*]
Resampler plugin
Reply #328
lvqcl, did you see this:
Hi lvqcl,

Would it be possible to expose the resampler's "Quality" setting (Normal / Best) via its default settings (found in Advanced -> Playback -> SoX Resampler default settings)? It is the only thing that is not exposed there.

Thank you for all the hard work!
I'd really appreciate an answer.

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Resampler plugin
Reply #329
I'd really appreciate an answer.

Other components can use resampling routines of this plugin via resampling service. They specify target samplerate and target quality when they create resampler instances; foo_dsp_resampler takes other settings from advanced preferences.

So what this plugin should do if the default quality setting is highest but some component requests low quality resampling (or vice versa)? Somebody will always ask me why my plugin ignores quality setting. 


Robertina, Night Rain: try attached plugins.

  • Dario
  • [*][*][*]
Resampler plugin
Reply #330
I'd really appreciate an answer.

Other components can use resampling routines of this plugin via resampling service. They specify target samplerate and target quality when they create resampler instances; foo_dsp_resampler takes other settings from advanced preferences.

So what this plugin should do if the default quality setting is highest but some component requests low quality resampling (or vice versa)? Somebody will always ask me why my plugin ignores quality setting. 

Cool; thanks for the explanation.

  • Robertina
  • [*][*][*][*][*]
  • Banned
Resampler plugin
Reply #331
Robertina, Night Rain: try attached plugins.

Both versions are working perfectly here. Thanks a lot for having taken into account to re-add output to console, lvqcl. 

I wish more DSPs would output their status to the console as your resamplers do.
This is HA. Not the Jerry Springer Show.

  • AFAIK
  • [*]
Resampler plugin
Reply #332
Great plugin!

Any plan to get it into the official repository?

Resampler plugin
Reply #333
if i save a dsp chain preset in foobar with some custom resampler(sox) settings, then load some other preset, then reload the preset with resampler(sox) its custom settings are lost (all at defaults again).

if i do the same with resampler (pphs), all custom settings are preserved upon reloading preset.


  • lvqcl
  • [*][*][*][*][*]
  • Developer
Resampler plugin
Reply #334
Cannot reproduce: everything is ok here.

Just in case: post a list of installed plugins.

  • SoNic67
  • [*][*][*]
Resampler plugin
Reply #335
Robertina, Night Rain: try attached plugins.

Is there a way to add the console info to status bar?

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Resampler plugin
Reply #336
It's not possible now, and I have no idea is it possible at all.

  • Zippy7
  • [*]
Resampler plugin
Reply #337
There is interest in adding a SoX resampler to REAPER for both offline and real-time purposes.  First, I would like to understand the differences between libsox (as opposed to libsoxr) and lvqcl's fb2k resampler.  Is the follwing correct?
1. lvqcl has removed code not related to the resampler (rate effect) from libsox.
2. lvqcl has converted the int32 I/O to float32 for compatibility with fb2k.
3. lvqcl adds variants for SSE, SSE2 and SSE3 for optimized CPU usage.

The best choices for REAPER seem to be either libsoxr or lifting code from lvqcl's fb2k resampler.  Since REAPER is a 64-bit audio engine, libsoxr looks best for offline resampling because it support double64 audio through the whole path, while lvqcl's would introduce quantization to float32 in the path.  For real-time resampling/monitoring during mixing or mastering, float32 would be of sufficient quality since the DAC is 24 bits maximum.  How would you compare libsoxr and lvqcl's resampler in terms of CPU usage and latency?

  • SoNic67
  • [*][*][*]
Resampler plugin
Reply #338
How would you compare libsoxr and lvqcl's resampler in terms of CPU usage and latency?

I did try to measure the usage. On a Core2Duo E7200 running at 3GHz, with lvqc's resampler foobar oscillates between 00 and 01 %. Changes once per second. Without the resampler, it does the same, it just flips less often and stays more time on 00 than 01.
My take is that the 'CPU ussage', for a normal PC, is not an issue at all. Probably if you try it on an Atom or a PIII platform to find it different...
  • Last Edit: 28 July, 2013, 11:51:04 AM by SoNic67

  • DragonQ
  • [*]
Resampler plugin
Reply #339
I can't use WASAPI due to the silent stream bug, which Foobar doesn't work around when doing manual track changes (yet). So I'm stuck using Direct Sound for my HDMI output, which I have set to 48 kHz 24-bit (most of my HTPC usage is TV/video). Is it worth my time using this plugin? How can I actually test whether SoX does a better job of resampling 44.1 kHz music to 48 kHz than my nVidia card? I have a few 96 kHz 24-bit files too - would any problems arise if I set the shared mode to 96 kHz 24-bit instead of 48 kHz 24-bit?

  • Propheticus
  • [*][*][*]
Resampler plugin
Reply #340
You can do a RMAA recording test, playing the testfile from foobar2000 with all replaygain and dsp disabled at volume 100%. Then do the same with the SoX resampler DSP loaded and compare results. When you find differences in the graphs this doesn't have to automatically mean you can actually hear these differences though!
Better would be a blind listening test where you ask someone else to change the resampling without telling you what you're listening to. Best would be using a third option as a reference. This could be another (expected to be far worse) resampler plugin or the SoX resampler with far lower settings.  The other person would randomly choose an order in which to use these 3 options after which you tell him your preference from best to worst. Repeat ~5-10 times and compare results. If there's a clear preference for one of the 2 options you're interested in, this is what objectively sounds best (to you). If it's ~tied between nVidia and SoX, it doesn't matter. The reference should come 3rd (almost) all the time though.
  • Last Edit: 02 August, 2013, 09:48:08 AM by Propheticus

  • Glenda
  • [*][*]
Resampler plugin
Reply #341
Is there any way to use insert command lines like this which has can allow the use of Foobar to replace the digital filter of a DAC:

rate -v -M -b 87.5 38200 dither -S

  • pablof
  • [*]
Resampler plugin
Reply #342
Any chance of conditional resampling depending on the number of channels of the audio track being played?

What I am trying to do is:

- Resample stereo tracks to 24/192.
- Resample multichannel tracks to 24/96.

My HTPC is hooked to a Pioneer SC-LX81 receiver through HDMI. This receiver unconditionally upsamples everything to 24/192, a behaviour that I am trying to avoid by means of what I assume is a better upsampler (SoX) in Foobar. The problem is that the dsp inside the receiver doesn't have enough horsepower to do room & phase correction with multichannel audio at 24/176 and beyond, so it stays at 24/96 in this case.

Any idea?

Thanks!

  • marc2003
  • [*][*][*][*][*]
Resampler plugin
Reply #343
setup 2 DSP chains and then you can use this component to switch between them based on title formatting...

http://www.hydrogenaudio.org/forums/index....showtopic=96094

  • pablof
  • [*]
Resampler plugin
Reply #344
Hi, marc.

setup 2 DSP chains and then you can use this component to switch between them based on title formatting...

http://www.hydrogenaudio.org/forums/index....showtopic=96094


Thankyou very much! This seems exactly what I need.

Resampler plugin
Reply #345
I just tried to convert a 96 kHz file to 44.1 kHz.
The size of the file is over 5 GB and it didn't work.

Where is the limit sizewise and is there any chance to convert a huge file in one go ?

thanks, Pat

  • xnor
  • [*][*][*][*][*]
  • Developer
Resampler plugin
Reply #346
it didn't work


Could you be more specific? Works for me..
"I hear it when I see it."

  • Sober5
  • [*]
Resampler plugin
Reply #347
Great job done with the the resampler! Just wondering, why don't you let the user choose the output bit depth as the original version allows?

I suspect that changing the bitdepth outside of the DSP plugin may produce inferior results compared to doing this along with the resampling within the same plugin...

  • xnor
  • [*][*][*][*][*]
  • Developer
Resampler plugin
Reply #348
why don't you let the user choose the output bit depth

Because re-quantization happens when passing the audio data to the soundcard. In the case of Direct Sound that's completely outside of any audio player's hands and in case of ASIO/WASPI (exclusive only) the particular output plugin does the work right before the audio data leaves the player.

  • Last Edit: 18 November, 2013, 05:18:19 PM by xnor
"I hear it when I see it."

  • Sober5
  • [*]
Resampler plugin
Reply #349
I don't agree. Look at this example. Upsampling 44100 (16 bit) to 88200. My DAC supports 32 bits. The SOX plugin works internally on 32 bits of precision. After resampling is done SOX rounds the result back to 16 bits (in the current implementation of foobar filter). Then you suggest to change it back to 32 bits using the output filter. There you go: you have your quantization errors. If you allowed SOX to output 32 bits, it would be the best possible scenario in my case.

I know we are talking about very subtle differences.

I can understand the argument about direct sound, but I'm using ASIO output (and I assume most people using the SOX resampler should be aware of the limitations of Direct Sound as they want to achieve best possible quality...). ASIO will output the stream going out of the player directly. In this case 16 bits. No way to change it.