Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Resampler plugin (Read 491889 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.



Re: Resampler plugin

Reply #528
Peter made it super simple. I use dark mode support provided by the core so binaries don't get bloated.

#include <foobar2000/SDK/coreDarkMode.h>
In class dialog_dsp_rate add private member:
fb2k::CCoreDarkModeHooks m_hooks;

In OnInitDialog() add:
m_hooks.AddDialogWithControls(m_hWnd);

This is it. If you had a preferences page you would need to add preferences_state::dark_mode_supported to your get_state() return value.

Re: Resampler plugin

Reply #529
Thanks, guys! I don't mind using "old" foobar for now, but I'm looking forward to a 64bit future. :)

In the meantime I created a quick 64-bit and dark mode aware compile...
When used with "Normal" quality I get garbled sound, in converted audio and in real-time resampling (playback). This was with a 48kHz file into 88.2kHz output.

Re: Resampler plugin

Reply #530
It seems I can't nuke old attachments on this forum even after all the updates. Previous compile used 32-bit float routines for signal handling when best quality wasn't used, now I forced 64-bit float processing all the time.

Re: Resampler plugin

Reply #531
glad to see this is still maintained. thanks!

Re: Resampler plugin

Reply #532
Can you make it possible to set the Bandwidth to more than 99.0 % (99.9999・・・・・・), or use detailed settings like more attenuation (db), tap size for example (This could be useless but I just want to try. I guess everyone have enough machine to try now).

Re: Resampler plugin

Reply #533
I ran a quick speed test on best quality (24bit 96khz -> 24bit 44,1khz):
    SoX 64-bit plugin: 91.81x realtime
    dBpoweramp/SSRC: 46.33x realtime
It is still almost 2 times faster.

Re: Resampler plugin

Reply #534
@lvqcl
Have u got any closer to making a new v2 resampler component or?

Re: Resampler plugin

Reply #535
Am I guessing correctly that "Normal" quality in the plugin is the same as "High" quality in SoX?



 

Re: Resampler plugin

Reply #539
I tried to replicate the (2015) sox.exe rate -v setting by using Best; 95%; no aliasing; linear phase in the plugin. But the results were not identical, even with 16bit files and dithering disabled (-D in the cli).
Is this expected? I know there are some differences between the two when handling 32bit float files, but IDK if that explains it.


And I noticed that Sox has an undocumented rate -u ("ultra") quality level. It's described here.
It would be nice to have that available, even if it's overkill.

Re: Resampler plugin

Reply #540
What is passband, which % is the best?

Re: Resampler plugin

Reply #541
What is passband, which % is the best?
From everything I've read, it's 95%.

Even the SoX FAQ states that for "most people's needs, 99% of the time", the bandwidth setting should not be changed from the default setting of 95%.

In the SoX PDF, it states: "The term ‘pass-band’ is used to refer to all frequencies up to the band-width point (e.g. for 44.1kHz sampling rate, and a resampling band-width of 95%, the pass-band represents frequencies from 0Hz (D.C.) to circa 21kHz). Increasing the resampler’s band-width results in a slower conversion and can increase transient echo artefacts (and vice versa)."

There are lots of tests and discussions about this, and it seems that there are opinions and viewpoints of every stripe, but a good site for objective data regarding sample rate conversion tests is http://src.infinitewave.ca/

Re: Resampler plugin

Reply #542
@lvqcl
Have u got any closer to making a new resampler component for v2 x64 or?
(and x86 also ;) )

Re: Resampler plugin

Reply #543
@lvqcl I would like to add my voice to those who would be very interested in a 64bit version of your SoX Resampler (and mod1 version too). I've moved to the Secret Rabbit plugin in the interim, but SoX works faster in my perception. Thank you!



Re: Resampler plugin

Reply #546
Interface choices for quality are "normal" or "best"
According to the SOC documentation SOX has "low" "quick" "medium" "high" "very high"
"Low" and "quick" are of too low quality; "medium" is also useless IMHO.
"Normal" is roughly equal to "high", "best" to "very high".


thanks. So if I'm right, then for 16 bit sources, Normal is best, as it has greater stop band attenuation than 16 bit PCM's SNR anyway and has less of the terrible and likely inaudible ripple than Best...

Re: Resampler plugin

Reply #547
I just wanted to say thanks for the updated SoX plug-in for Foobar2000 v2.0 64-bit (posted above at... https://hydrogenaud.io/index.php/topic,67376.msg1014620.html#msg1014620 ) as I just noticed the previous one that's been around for ages don't work with Foobar2000 64-bit.

I had to convert some "HD" 96/24 to standard 44.1/16 FLAC and noticed SoX did not work (and I checked my plug-ins and noticed they were not shown as installed), so I temporarily installed the x86(32-bit) of Foobar2000 v2.0 and things were good once again as it recognized my previous installed SoX. then I found this general post and looked at more recent posts and thankfully it was updated to work on 64-bit Foobar2000 v2.0, so then I removed the x86 Foobar2000 install on Linux etc. so now I can just stick with the 64-bit Foobar2000 (as other plug-ins were updated like the ABX plugin, so all I had to do was just update and the ABX works once again).

p.s. Happy 4th of July everyone ;)
For music I suggest (using Foobar2000)... MP3 (LAME) @ V5 (130kbps). NOTE: using on AGPTEK-U3 as of Mar 18th 2021. I use 'fatsort' (on Linux) so MP3's are listed in proper order on AGPTEK-U3.

Re: Resampler plugin

Reply #548
It seems I can't nuke old attachments on this forum even after all the updates. Previous compile used 32-bit float routines for signal handling when best quality wasn't used, now I forced 64-bit float processing all the time.

Thank you so much Case. This was the plugin keeping me from trying 2.0 x64 out, I can live without the rest on at least two machines, but I've gotten too used to having SoX around for downsampling HRA, and for one device that really only likes being used at 48 kHz.

Main machine has the "_mod" version and it's been so long that I forgot why I chose it...and I'm still on 0.8! I assume it's because I was using WASAPI and wanted it to only resample what my AVR could not handle. Too many components I'm still waiting on there though.

Re: Resampler plugin

Reply #549
Main machine has the "_mod" version and it's been so long that I forgot why I chose it...and I'm still on 0.8! I assume it's because I was using WASAPI and wanted it to only resample what my AVR could not handle. Too many components I'm still waiting on there though.
The last "mod" versions were .84 and are posted at the link below;  if anyone (Case?) wants to do 64-bit versions of them, much appreciated!
https://hydrogenaud.io/index.php/topic,67376.msg990274.html#msg990274