IPB

Welcome Guest ( Log In | Register )

15 Pages V  « < 13 14 15  
Reply to this topicStart new topic
Resampler plugin, uses SoX 14.2.0 resampling routines
lvqcl
post Nov 19 2013, 16:02
Post #351





Group: Developer
Posts: 3399
Joined: 2-December 07
Member No.: 49183



QUOTE (Sober5 @ Nov 19 2013, 15:07) *
After resampling is done SOX rounds the result back to 16 bits (in the current implementation of foobar filter).


It doesn't: it receives 32-bit float and outputs 32-bit float. Then fb2k output plugin reduces bit depth if necessary.
Go to the top of the page
+Quote Post
xnor
post Nov 19 2013, 16:25
Post #352





Group: Developer
Posts: 710
Joined: 29-April 11
From: Austria
Member No.: 90198



QUOTE (Sober5 @ Nov 19 2013, 13:07) *
I don't agree. [..] Then you suggest to change it back to 32 bits using the output filter. There you go: you have your quantization errors.

This is not a matter of (dis)agreement though. The internal format is 32 bit floating point in foobar2000 and plugins usually receive, process* and output 32 bit data except for some output plugins.
*) Processing is sometimes done using 64 bit floating point.

As I said, quantization is done as late as possible in order to not introduce unnecessary errors.

QUOTE
ASIO will output the stream going out of the player directly. In this case 16 bits. No way to change it.

The ASIO output plugin should choose the highest available bit depth (32 bit floating point or signed integer if available, if not 24 bit signed integer and so on..).
Go to the top of the page
+Quote Post
tedsmith
post Nov 19 2013, 16:52
Post #353





Group: Members
Posts: 87
Joined: 29-January 13
Member No.: 106279



QUOTE (Sober5 @ Nov 19 2013, 04:07) *
After resampling is done SOX rounds the result back to 16 bits (in the current implementation of foobar filter).
...
ASIO will output the stream going out of the player directly. In this case 16 bits. No way to change it.
And if you don't believe the author of the plugin, using your example of resampling 44.1/16 to 88.2 via ASIO my DAC reports 88.2/24 bits: i.e. the low bits are changing.
Go to the top of the page
+Quote Post
Sober5
post Nov 19 2013, 17:42
Post #354





Group: Members
Posts: 6
Joined: 18-November 13
Member No.: 112299



Ok, ok! Thanks for the additional info!

However, my previous DAC reported 16 bits when played via foobar even though it supported 24 bits (in all modes: KS, ASIO, wasapi). I didn't use any plugins at that time. And with no plugins (and not using volume control), 16 bit output was indeed the best option.

Unfortunately, my new DAC doesn't report anything, so I assumed ASIO feeds it also with 16 bits. I'll try to find a way to check what bit depth is on the output (analyze USB traffic?). Maybe when a plugin is enabled the output switches automatically to higher bit depth?
Go to the top of the page
+Quote Post
xnor
post Nov 19 2013, 17:55
Post #355





Group: Developer
Posts: 710
Joined: 29-April 11
From: Austria
Member No.: 90198



Without plugins you're automatically using Direct Sound. The format is configured in the Windows sound control panel (right click sound tray icon -> playback devices) -> properties of the playback device -> advanced -> default format.

If you resample to 96 kHz for example you should set this to a format with matching sampling rate, for example to "24 bit, 96000 Hz". That way the Windows audio engine will not resample (again).

This post has been edited by xnor: Nov 19 2013, 17:56
Go to the top of the page
+Quote Post
Sober5
post Nov 19 2013, 17:57
Post #356





Group: Members
Posts: 6
Joined: 18-November 13
Member No.: 112299



"Without plugins" I ment without DSP plugins. As I said, the output was set to either KS, ASIO, wasapi. All gave 16 bits on output for 16 bit files.

This post has been edited by Sober5: Nov 19 2013, 18:03
Go to the top of the page
+Quote Post
xnor
post Nov 19 2013, 18:20
Post #357





Group: Developer
Posts: 710
Joined: 29-April 11
From: Austria
Member No.: 90198



QUOTE (Sober5 @ Nov 19 2013, 18:57) *
"Without plugins" I ment without DSP plugins. As I said, the output was set to either KS, ASIO, wasapi. All gave 16 bits on output for 16 bit files.


KS and WASAPI plugins allow you to set the output bit depth. If you set it to 16 bit it's going to be 16 bit.
ASIO, as I said before, should choose the highest supported bit depth automatically.
Go to the top of the page
+Quote Post
Sober5
post Nov 20 2013, 00:22
Post #358





Group: Members
Posts: 6
Joined: 18-November 13
Member No.: 112299



QUOTE (xnor @ Nov 19 2013, 18:20) *
KS and WASAPI plugins allow you to set the output bit depth. If you set it to 16 bit it's going to be 16 bit.


That for sure, when set to 16 bit it will output 16 bit. However KS when set to 24 bit worked for me based on the input file bit depth. For 16 bit files: 16 bit, for 24 bit files: 24 bit. That's fine as this plugin is ment to give you bit-perfect playback. I will try to find a way how to verify if this is the same when DSP plugin is enabled and get back to you. I'm thinking of trying http://www.usblyzer.com/ ...

This post has been edited by Sober5: Nov 20 2013, 00:23
Go to the top of the page
+Quote Post
tedsmith
post Nov 20 2013, 02:20
Post #359





Group: Members
Posts: 87
Joined: 29-January 13
Member No.: 106279



QUOTE (Sober5 @ Nov 19 2013, 16:22) *
I will try to find a way how to verify if this is the same when DSP plugin is enabled and get back to you. I'm thinking of trying http://www.usblyzer.com/
FWIW On my system using KS and a 44.1/16 track I see 16 bits changing at the DAC, when resampling to 88.2 I see 24 bits changing at 88.2k at the DAC.
When I tried USBlyzer (for another reason) I was annoyed that the only USB audio decoders they support are for USB Audio 1.0. But raw packets should be find for your purpose.
Go to the top of the page
+Quote Post
Sober5
post Nov 20 2013, 10:10
Post #360





Group: Members
Posts: 6
Joined: 18-November 13
Member No.: 112299



Thanks! So it seems the output plugins are intelligent as I hoped them to be smile.gif
Go to the top of the page
+Quote Post
Zippy7
post Nov 21 2013, 15:22
Post #361





Group: Members
Posts: 11
Joined: 10-September 12
Member No.: 103020



@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.
Go to the top of the page
+Quote Post
lvqcl
post Nov 21 2013, 15:39
Post #362





Group: Developer
Posts: 3399
Joined: 2-December 07
Member No.: 49183



QUOTE (Zippy7 @ Nov 21 2013, 18:22) *
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.
Go to the top of the page
+Quote Post
Zippy7
post Nov 24 2013, 21:29
Post #363





Group: Members
Posts: 11
Joined: 10-September 12
Member No.: 103020



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
Go to the top of the page
+Quote Post
xnor
post Nov 24 2013, 22:12
Post #364





Group: Developer
Posts: 710
Joined: 29-April 11
From: Austria
Member No.: 90198



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?

This post has been edited by xnor: Nov 24 2013, 22:13
Go to the top of the page
+Quote Post
Glenda
post Nov 25 2013, 04:33
Post #365





Group: Members
Posts: 66
Joined: 27-November 07
Member No.: 49067



QUOTE (Glenda @ Aug 19 2013, 04:27) *
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.
Go to the top of the page
+Quote Post
xnor
post Nov 25 2013, 16:36
Post #366





Group: Developer
Posts: 710
Joined: 29-April 11
From: Austria
Member No.: 90198



QUOTE (Glenda @ Nov 25 2013, 05:33) *
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)?

This post has been edited by xnor: Nov 25 2013, 16:40
Go to the top of the page
+Quote Post
lvqcl
post Nov 26 2013, 15:47
Post #367





Group: Developer
Posts: 3399
Joined: 2-December 07
Member No.: 49183



QUOTE (Glenda @ Nov 25 2013, 07:33) *
Why wouldn't the sox plugin accept SOX command lines

It's not a SoX plugin, it contains only resampling routines from SoX utility and nothing else.

QUOTE (Glenda @ Nov 25 2013, 07:33) *
should be the easiest thing to implement into foobar.

O rly? huh.gif
Go to the top of the page
+Quote Post
Zippy7
post Nov 26 2013, 20:05
Post #368





Group: Members
Posts: 11
Joined: 10-September 12
Member No.: 103020



QUOTE (xnor @ Nov 24 2013, 16:12) *
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.
Go to the top of the page
+Quote Post
Glenda
post Dec 24 2013, 16:29
Post #369





Group: Members
Posts: 66
Joined: 27-November 07
Member No.: 49067



QUOTE (Glenda @ Nov 24 2013, 23:33) *
QUOTE (Glenda @ Aug 19 2013, 04:27) *
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.
Go to the top of the page
+Quote Post
Glenda
post Dec 24 2013, 17:52
Post #370





Group: Members
Posts: 66
Joined: 27-November 07
Member No.: 49067



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.)
Go to the top of the page
+Quote Post
xnor
post Dec 25 2013, 00:36
Post #371





Group: Developer
Posts: 710
Joined: 29-April 11
From: Austria
Member No.: 90198



QUOTE (Glenda @ Dec 24 2013, 17:29) *
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.

QUOTE (Glenda @ Dec 24 2013, 17:29) *
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.

QUOTE (Glenda @ Dec 24 2013, 18:52) *
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?
Go to the top of the page
+Quote Post
wottha
post Sep 7 2014, 23:29
Post #372





Group: Members
Posts: 19
Joined: 15-June 13
Member No.: 108671



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.

This post has been edited by wottha: Sep 7 2014, 23:33
Go to the top of the page
+Quote Post
lvqcl
post Sep 8 2014, 15:30
Post #373





Group: Developer
Posts: 3399
Joined: 2-December 07
Member No.: 49183



QUOTE (wottha @ Sep 8 2014, 02:29) *
So I guess they're all using the SoX default settings? (Quality Best, Passband 95%, Phase Linear 50%)?

Yes, it seems so.

QUOTE (wottha @ Sep 8 2014, 02:29) *
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.

QUOTE (wottha @ Sep 8 2014, 02:29) *
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.
Go to the top of the page
+Quote Post
wottha
post Sep 9 2014, 20:03
Post #374





Group: Members
Posts: 19
Joined: 15-June 13
Member No.: 108671



QUOTE (lvqcl @ Sep 8 2014, 07:30) *
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)

This post has been edited by wottha: Sep 9 2014, 20:45
Go to the top of the page
+Quote Post

15 Pages V  « < 13 14 15
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd October 2014 - 13:42