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 480969 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Resampler plugin

Reply #375
Thanks! So it seems the output plugins are intelligent as I hoped them to be

Re: Resampler plugin

Reply #376
Does this version exist here? http://src.infinitewave.ca/ If so, which one is it exactly since there are a few versions of sox there.


I have created some test, and results sent to infinitewave.

I found that sox resampler is very good in the sense of impulse fidelity, with 33% phase response and 80% passband (with 0.6a version).
However I only use it for upsample 44.1 kHz materials to 96kHz so the relative small passband is not affect the appreciable region of sound.

Re: Resampler plugin

Reply #377
@lvqcl: With the normal version of the SoX resampler v0.83, when the target sample rate is 192kHz, and the playback file is 192kHz, is the SoX resampler's output bit-exact with the SoX resampler's input?  I am not concerned with a buffering delay, only quantization errors.

Re: Resampler plugin

Reply #378
when the target sample rate is 192kHz, and the playback file is 192kHz

There's no processing, no buffering, nothing.

Also, you can compare input and output files with foo_bitcompare plugin.

Re: Resampler plugin

Reply #379
Thanks lvqcl.  Well done!

I have a feature request for increased flexibility.  My external DAC supports a maximum sample rate of 192 kHz.  I would like to upsample 44k & 48k by a factor of 4, 88k & 96k by a factor of 2, and not convert 176k & 192k.  I tried your SoX resampler v0.8.3 mod2 and configured it to upsample by 4 only 44k, 48k, 88k & 96k.  foobar2000 then threw an error for 88k & 96k because my output device does not support the 4X sample rate.  I see two ways to solve this:
a) SoX resampler recognizes the maximum supported sample rate of the output device and reduces the upsample factor from 4 to 2 to 1 as needed.
b) The mod2 version uses a semicolon-separated list of I/O sample rates to convert.  My example would be 44100;176400;48000;192000;88200;176200;96000;192000

Re: Resampler plugin

Reply #380
Why don't you just only resample 88.2 kHz or 96 kHz by 2x, and with another instance resample only 44.1 kHz or 48 kHz by 4x?
"I hear it when I see it."

Re: Resampler plugin

Reply #381
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



Why wouldn't the sox plugin accept SOX command lines,  should be the easiest thing to implement into foobar.  I guess we are all just waiting on a 64 bit Foobar at this point anway.

Re: Resampler plugin

Reply #382
rate -v -M -b 87.5 38200 dither -S
Why wouldn't the sox plugin accept SOX command lines,  should be the easiest thing to implement into foobar.  I guess we are all just waiting on a 64 bit Foobar at this point anway.


I don't think that makes sense, since this plugin only does resampling (rate effect) and nothing else.

-v = very high quality = "Best" in the plugin
-M = minimum phase = 0% phase response in the plugin
-b = bandwidth ... closest you can get with the plugin is 90%, maybe this can be decreased to 80% in an update (or the lowest sox allows)?
"I hear it when I see it."


Re: Resampler plugin

Reply #384
Why don't you just only resample 88.2 kHz or 96 kHz by 2x, and with another instance resample only 44.1 kHz or 48 kHz by 4x?

@xnor: Thanks for the clever idea.  I tried your idea, and it worked.

@lvqcl: I hope you will keep my ideas in mind for your next update.  Would be nice to achieve more flexibility with just one instance.

Re: Resampler plugin

Reply #385
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



Why wouldn't the sox plugin accept SOX command lines,  should be the easiest thing to implement into foobar.  I guess we are all just waiting on a 64 bit Foobar at this point anway.



Should be but isn't, the foobar plugin is about as watered down about bad as some mac app from the 90's. 

Foobar severely needs a good resampler like Syngalist or the mac program that comes with the Izotope 64bit SRC,  but I guess as mentioned in an
earlier post we probably need a 64 bit core Foobar before any of that will happen.

Lets hope that happens because the future of computer audio is to move the everything from the digital filter prior to the computer.  I know this forum is stuck in thinking
all over-sampling is the same,  but I've' ABX's and found the digital filter one of the most important influences on sound.  And wha ta better way to
handle it than with x86 vs some proprietary fpga.

Re: Resampler plugin

Reply #386
Sorry for the grammar I got caught off correcting it.  My main point is the spirit of foobar and its success has been customization.  We've buried our
heads in the sand while people resort to non-oversamplng DAC's and expensive priority programmed fpga's because the old SIW chips and the penny-pinching oversampler on dac chip just can't technically compete with what a modern PC can do,  and in the spirit of Foobar make it customizable,  pick your algoritm you settings.  Whether it sounds better is not the argument its
piched on dac chip filter just can't give the end user SOTA,  and ultimately the the aility to build a very simple DAC with the number crutching done by the computer.

But again a good first start with be a modern SOX plugin that accepts command lines with no bandwidth limitations (could least get Meridian apodizing.)

Re: Resampler plugin

Reply #387
Foobar severely needs a good resampler like Syngalist or the mac program that comes with the Izotope 64bit SRC,  but I guess as mentioned in an
earlier post we probably need a 64 bit core Foobar before any of that will happen.

SoX is a very good resampler.
No, you don't need a 64 bit core to do 64 bit processing, but depending on the algorithm and requirements you might be fine with 32 bit floats or even ints.

I know this forum is stuck in thinking
all over-sampling is the same,  but I've' ABX's and found the digital filter one of the most important influences on sound.

What filters? What test setup? Please provide details.

But again a good first start with be a modern SOX plugin that accepts command lines with no bandwidth limitations (could least get Meridian apodizing.)

Why do you need command line options?
Why would you want an apodizing filter that doesn't suppress images?
"I hear it when I see it."

Re: Resampler plugin

Reply #388
Hi and Happy New Year!

I tried down sampling with the SOX 0.8.3 on my foobar2000 1.1.15 and 1.2.9, but it not works. The "console" screen does not show that work.
I also tried the the built in Resampler PPHS and it is not working either.
I tried the SSRCX and it works correctly.
Could somebody tell me what is the problem with the SoX and the PPHS Resampler???? Are they not compatible with newer foobars?

Tyimo

Re: Resampler plugin

Reply #389
When ripping tracks from cd to individual FLACtracks using the upsampler to double the sample rate I get the following problem:

Close to the end of each track the sound gets interrupted by a short pause during the fade out of the track. After this 1..2 sec pause I hear the remainder of the fade out and another pause before the next track starts.
When I replay the following track, by directly starting it, I first hear the short fade out of the previous track bofere the intended track starts to play.

Using the latest version of foobar and the resampler dsp, (Original and both mods do the same)
Win 7 64bit

I do not have this problem when using the pphs resampler.

Re: Resampler plugin

Reply #390
I cannot reproduce this.

Re: Resampler plugin

Reply #391
I installed all Sox resampler plugins, but they do now work. My W4S DAC-2 still shows that it's accepting 44.1.

I tried PPHS resampler, it also does not work.

I have Win 7 64 bit and Foobar 1.3.1.

My guess is that the problem is Win 7 64 bit, because before I had Win 7 32 bit and all these resamplers worked.

Re: Resampler plugin

Reply #392
I installed all Sox resampler plugins, but they do now work. My W4S DAC-2 still shows that it's accepting 44.1.

I tried PPHS resampler, it also does not work.

I have Win 7 64 bit and Foobar 1.3.1.

My guess is that the problem is Win 7 64 bit, because before I had Win 7 32 bit and all these resamplers worked.


It looks I've found the culprit:

You have to install the WASAPI plugin and choose it as an output option in the Foobar settings.

Without the WASAPI plugin installed, Windows outputs all the sounds in a format which is currently chosen in the properties of your sound device (format by default) in the Windows Control Panel (where you control all the sound devices).

I hope it helps.

Re: Resampler plugin

Reply #393
Thank you lvqcl for making such a great FB2K component.

One question though.  At src.infinitewave.ca, all three of the following seem to be the same:

foo_dsp_resampler
Audacity 2.0.3
SoX 14.4 High Quality

(except the artifacts in the Sox 14.4 Sweep, but that doesn't seem quite right). 

So I guess they're all using the SoX default settings? (Quality Best, Passband 95%, Phase Linear 50%)?

What settings in foo_dsp_resampler are equivalent to:
SoX 14.4 VHQ Linear Phase (at infinitewave)

Would that be Quality Best, Passband 99%, Phase Linear 50%?

Is the only downside of Passband at 99% the speed of processing?  Because it's plenty fast for me.  Much faster than many commercial resamplers and those included in many daw programs.

Thanks.

Re: Resampler plugin

Reply #394
So I guess they're all using the SoX default settings? (Quality Best, Passband 95%, Phase Linear 50%)?

Yes, it seems so.

What settings in foo_dsp_resampler are equivalent to:
SoX 14.4 VHQ Linear Phase (at infinitewave)

Would that be Quality Best, Passband 99%, Phase Linear 50%?

AFAIK yes.

Is the only downside of Passband at 99% the speed of processing?  Because it's plenty fast for me.  Much faster than many commercial resamplers and those included in many daw programs.

Sharper filter means longer ringing. Compare Afconvert (Normal) with Afconvert (Bats):

VS

Different people prefer different filters, but if both input and output samplerates are high enough (say, 44.1 kHz or higher) then it doesn't matter much.

Re: Resampler plugin

Reply #395
Sharper filter means longer ringing. Compare Afconvert (Normal) with Afconvert (Bats):

Thank you for the explanation about the longer ringing.

Maybe it's more common to show the default settings at infinitewave now, but for purposes of appearances relative to the "ideal", seems like maybe 99% Passband would look "better" there, instead of or in addition to the default.

Also, just an observation, but with SoX it seems like the settings 99% Passband, 50% Phase (linear), Aliasing enabled, would probably look more like Weiss Saracon than any other SRC there, given how the SoX High Quality (95% ?) Aliasing enabled looks.

Thank you again lvqcl.

EDIT:  afaik Weiss Saracon shown at infinitewave is the one and only src setting available in Saracon.  there are no optional parameter settings. (afaik)

Re: Resampler plugin

Reply #396
I just have a feature suggestion for this already excellent plugin.

Add the ability to upsample based on specified input sample rate, such as:

44.1KHz & 48KHz = Upsample x4
88.2KHz & 96KHz = Upsample x2
176.4KHz & 192KHz = No change, leave as-is

Re: Resampler plugin

Reply #397
Or, you can just set 192kHz as output samplerate. You won't get better quality because you upsample x2, x3 or x4.

Re: Resampler plugin

Reply #398
44.1KHz & 48KHz = Upsample x4
88.2KHz & 96KHz = Upsample x2


Add two of it, for each use the restrict to the following rates function.

Myself I resample to frequencies my DAC supports: 16k and 32k to 48k, and 11025 and 22050 to 44100.