IPB

Welcome Guest ( Log In | Register )

15 Pages V  < 1 2 3 4 5 > »   
Reply to this topicStart new topic
Resampler plugin, uses SoX 14.2.0 resampling routines
ncdrawl
post Jul 11 2009, 08:12
Post #51





Group: Members
Posts: 37
Joined: 5-October 08
Member No.: 59436



so...let me ask you this... in order to get the best "on paper" performance.. should we "allow aliasing" or no??

I am resampling everyhting to 192kHz.

This post has been edited by Frank Bicking: Jul 11 2009, 10:28
Reason for edit: Removed fullquote of the first post.
Go to the top of the page
+Quote Post
Steve Forte Rio
post Jul 16 2009, 20:49
Post #52





Group: Members
Posts: 443
Joined: 4-October 08
From: Ukraine
Member No.: 59301



QUOTE (lvqcl @ Jul 10 2009, 14:36) *
Original test signal (44.1 kHz)

can you give me a link to this test signal???
Go to the top of the page
+Quote Post
lvqcl
post Jul 18 2009, 07:26
Post #53





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



I made it myself with Adobe Audition: Generate -> Tones.

Base frequency: 11025 Hz;
Modulate by: 10900 Hz;
Modulation freq: 0.5 Hz
...
Flavor: Sine.
Go to the top of the page
+Quote Post
Steve Forte Rio
post Jul 18 2009, 10:15
Post #54





Group: Members
Posts: 443
Joined: 4-October 08
From: Ukraine
Member No.: 59301



Thank you very much! wink.gif
Go to the top of the page
+Quote Post
lvqcl
post Jul 29 2009, 01:19
Post #55





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



QUOTE (ncdrawl @ Jul 11 2009, 11:12) *
so...let me ask you this... in order to get the best "on paper" performance.. should we "allow aliasing" or no??

Sorry, I have no idea.

=====================================

As I mentioned before, f -> 2f -> 4f upsampling is much faster than direct f -> 4f. So I added fast 4x upsampling in the new (0.5.4.1) version.
(i.e. if you want to upsample from 44.1 to 176.4 kHz, the plugin first resamples to intermediate 88.2 kHz, and then from 88.2 to final 176.4)
Go to the top of the page
+Quote Post
lxofith
post Aug 19 2009, 22:08
Post #56





Group: Members
Posts: 18
Joined: 21-June 09
Member No.: 70859



Hello lvqcl,

First of all thanks a lot for your component, it is one of the reasons I keep using foobar as it lets me do upsampling without sound degradation.

I used to always resample to 48k, as this is the maximum rate supported by my DAC.

But lately I realized that staying at 44.1k lets me hear very fine nuances more accurately. By comparison, upsampling from 44.1k to 48k smoothes sounds out (music 'flows' better, or is more 'liquid'). I understand some may prefer this -- at least I used to anyway.

So for now I would like to keep 44.1k or 48k untouched, but downsample higher rates to something supported by the DAC. Ideally, I would like to downsample 88.2 and 176.4 to 44.1 (downsample x2 or x4), and 96 and 192 to 48.

Do you think it would be possible to have a 'adaptive downsample' kind of mode, where you would specify a maximum target rate and the component would downsample x2/x4/x8... until the rate is below or equal to the target rate? In my case, I would use 48k as the target rate.

Cheers
Go to the top of the page
+Quote Post
theilladelph
post Aug 22 2009, 12:01
Post #57





Group: Members
Posts: 1
Joined: 22-August 09
Member No.: 72539



Yea thanks a lot lvqcl... Been doing a lot of reading and have found tons of good info but I do have a question that I cant seem to find the answer to...

To upsample by uneven ratios, say to go from 44.1 kHz to 96 kHz, what is the best way to go? I read here somewhere that going from 44.1 to 48 causes artifacts around the 22kHz range, would this be minimized by going from 44.1 -> 88.2 -> 96 kHz? I am experimenting right now with upsampling 44.1 -> 176400 Hz (using the new Up x4 option) -> 96 kHz and it seems to sound better than anything else I've tried...

Thanks for any help
Go to the top of the page
+Quote Post
lvqcl
post Aug 22 2009, 12:13
Post #58





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



QUOTE (lxofith @ Aug 20 2009, 01:08) *
Do you think it would be possible to have a 'adaptive downsample' kind of mode, where you would specify a maximum target rate and the component would downsample x2/x4/x8... until the rate is below or equal to the target rate? In my case, I would use 48k as the target rate.

Maybe I'll make something similar, but now I don't have much free time.


QUOTE (theilladelph @ Aug 22 2009, 15:01) *
I read here somewhere that going from 44.1 to 48 causes artifacts around the 22kHz range, would this be minimized by going from 44.1 -> 88.2 -> 96 kHz?

I doubt it.
Go to the top of the page
+Quote Post
lvqcl
post Nov 19 2009, 18:40
Post #59





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



Modified version available now here: http://www.hydrogenaudio.org/forums/index....st&p=668463
Now it is possible to set a list of input frequencies that you don't want to resample.

Quick guide:

1. You set target samplerate to "48000" and typed "44100;88200;96000" in the list of frequencies.

Sound with sample rates 44100, 48000, 88200 and 96000 Hz will pass through the plugin, other will be resampled to 48000 Hz.

2. You set target samplerate to "[From the list]" and typed "44100;48000;96000" in the list of frequencies.

if samplerate = 44100, 48000 or 96000 Hz: pass through;
else if samplerate < 44100 Hz: resample to 44100;
else if samplerate < 48000 Hz: resample to 48000;
else: resample to 96000.

Note: you can add several instances of the resampler (with different settings) to the DSP chain and make more complex logic.
If you want to be sure that it works as expected, look at the console and you'll see the following message:
"SoX Resampler: Input rate = xxxxx, Output rate = yyyyy"


This post has been edited by lvqcl: Nov 19 2009, 19:13
Go to the top of the page
+Quote Post
lxofith
post Nov 19 2009, 21:04
Post #60





Group: Members
Posts: 18
Joined: 21-June 09
Member No.: 70859



QUOTE (lvqcl @ Nov 19 2009, 18:22) *
Modified version allows you to set a list of input frequencies that will pass through the plugin, unmodified. Or it can choose proper output frequency from the list.

Great work lvqcl, this is really what I was interested in cool.gif

I am using the option to select 'from the list', and I have entered the frequencies supported by my DAC: 32000, 44100, 48000.

Now when I play a 44.1k track, plugin outputs at 44.1k (unchanged).
When I play a 48k track, plugin outputs at 48k (unchanged).
When I play a 88.2k (or 176.4 I guess) track, plugin outputs at 48k.
When I play a 96k or 192k track, plugin outputs at 48k (downsample x2/x4 I had hoped, but doesn't seem to be the case in the code).

I must make tests, but I guess I would prefer the plugin to downsample x2/x4 for 88.2/176.4, instead of using the maximum available, which is not always the better option sound-wise. Plus it would be more CPU efficient to resample by a power of two, as you said in an earlier post.

I will try to post results ASAP.

Anyway awesome job!
Go to the top of the page
+Quote Post
lvqcl
post Nov 19 2009, 23:02
Post #61





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



Add 2 resamplers in your DSP chain

1st: target = 48k, list = "32000;44100;88200;176000".
2nd: target = 44.1k, list = "32000".
Go to the top of the page
+Quote Post
lxofith
post Nov 20 2009, 18:44
Post #62





Group: Members
Posts: 18
Joined: 21-June 09
Member No.: 70859



QUOTE (lvqcl @ Nov 19 2009, 23:02) *
Add 2 resamplers in your DSP chain

1st: target = 48k, list = "32000;44100;88200;176000".
2nd: target = 44.1k, list = "32000".

I assume you meant:

1st: target = 48k, list = "32000;44100;88200;176400".
2nd: target = 44.1k, list = "32000;48000".
Go to the top of the page
+Quote Post
lvqcl
post Nov 20 2009, 22:52
Post #63





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



QUOTE (lxofith @ Nov 20 2009, 20:44) *
I assume you meant:

1st: target = 48k, list = "32000;44100;88200;176400".
2nd: target = 44.1k, list = "32000;48000".


Of course. blush.gif
Go to the top of the page
+Quote Post
Robertina
post Nov 21 2009, 05:51
Post #64





Group: Members
Posts: 1306
Joined: 4-January 09
Member No.: 65169



lvqcl,

first I would like to say thank you for the SoX Resampler.

One question: removing a plugin from the components folder foobar2000 usually asks whether its settings are to be kept or deleted, but not so for the SoX Resampler (both normal and modified version). Does my foobar behave normally?

Robertina.
Go to the top of the page
+Quote Post
kode54
post Nov 21 2009, 07:39
Post #65





Group: Admin
Posts: 4580
Joined: 15-December 02
Member No.: 4082



QUOTE (Robertina @ Nov 20 2009, 20:51) *
One question: removing a plugin from the components folder foobar2000 usually asks whether its settings are to be kept or deleted, but not so for the SoX Resampler (both normal and modified version). Does my foobar behave normally?

That question only applies for components which store settings using configuration variables. This, like all properly coded DSP components, uses DSP presets to store settings for each DSP chain it's added to.
Go to the top of the page
+Quote Post
Robertina
post Nov 21 2009, 11:03
Post #66





Group: Members
Posts: 1306
Joined: 4-January 09
Member No.: 65169



Question answered, thank you, kode54.
Go to the top of the page
+Quote Post
lvqcl
post Nov 21 2009, 13:12
Post #67





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



...And you will see [DSP not found] line in the DSP settings. (or <ERROR> in fb2k 1.0 beta).
Go to the top of the page
+Quote Post
Robertina
post Nov 21 2009, 13:17
Post #68





Group: Members
Posts: 1306
Joined: 4-January 09
Member No.: 65169



Thank you, lvqcl.

And I love you new modified version, it is great.

Robertina.
Go to the top of the page
+Quote Post
a3aan
post Nov 21 2009, 16:39
Post #69





Group: Members
Posts: 80
Joined: 23-December 06
Member No.: 38930



QUOTE (lvqcl @ Nov 19 2009, 18:40) *


Great. Thanks a lot.
Go to the top of the page
+Quote Post
Olev
post Nov 24 2009, 21:07
Post #70





Group: Members
Posts: 2
Joined: 23-January 08
Member No.: 50734



QUOTE (lvqcl @ Nov 20 2009, 23:52) *
QUOTE (lxofith @ Nov 20 2009, 20:44) *
I assume you meant:

1st: target = 48k, list = "32000;44100;88200;176400".
2nd: target = 44.1k, list = "32000;48000".


Of course. blush.gif



Wouldn't it be better just to include x2 downsampler and list = 44100;48000? This is what I included in my foobar - this way I can play 88.2kHz SACD at 44.1 and DVD-A/Vinyl 96kHz at 48. Thanks for this mod, this is just what I was looking for!
Go to the top of the page
+Quote Post
lxofith
post Nov 24 2009, 21:23
Post #71





Group: Members
Posts: 18
Joined: 21-June 09
Member No.: 70859



QUOTE (Olev @ Nov 24 2009, 21:07) *
Wouldn't it be better just to include x2 downsampler and list = 44100;48000?

This does not handle 176.4 and 192 kHz correctly, as they would be played at 88.2 and 96 kHz, respectively.

I think it would be more intuitive to apply the filter to selected frequencies, instead of excluding specific frequencies.
Go to the top of the page
+Quote Post
Olev
post Nov 24 2009, 22:08
Post #72





Group: Members
Posts: 2
Joined: 23-January 08
Member No.: 50734



QUOTE (lxofith @ Nov 24 2009, 22:23) *
QUOTE (Olev @ Nov 24 2009, 21:07) *
Wouldn't it be better just to include x2 downsampler and list = 44100;48000?

This does not handle 176.4 and 192 kHz correctly, as they would be played at 88.2 and 96 kHz, respectively.

I think it would be more intuitive to apply the filter to selected frequencies, instead of excluding specific frequencies.


x2 and x4 downsampling is more efficient just look a few posts up. By excluding you can get away with this
Downsample x2 list = 44100, 48000, 176400, 192000
Downsample x4 list = 44100, 48000, 88200, 99600

But this is really splitting hairs! I have not seen a source with over 96kHz sampling rate and you can get away with only defining
Downsample x2 list = 44100, 48000 and get away with almost anything you throw at it.

This will only use optimized sampling and not a select frequency. Maybe the author of this plugin can comment more on x2/x4 vs specified sample rate? Of course I might be wrong and 96 downsampled x2 uses the same algorithm as specifying 48000.
Go to the top of the page
+Quote Post
lvqcl
post Nov 25 2009, 00:40
Post #73





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



QUOTE (Olev @ Nov 25 2009, 00:08) *
Of course I might be wrong and 96 downsampled x2 uses the same algorithm as specifying 48000.

Yes, that's true. IOW, if the input frequency is 96kHz, there's no difference between output freq. set to "48000" or "downsample x2".



QUOTE (lxofith)
I think it would be more intuitive to apply the filter to selected frequencies, instead of excluding specific frequencies.

Well, the idea was to exclude sample rates that soundcard support natively.
Go to the top of the page
+Quote Post
gecus
post Dec 2 2009, 17:31
Post #74





Group: Members
Posts: 15
Joined: 11-February 09
Member No.: 66855



Just a silly question for most of you in the development world...

I am using FLAC files. Will this resampler work with compressed files, or I can only do it in WAV?
If it has to be only WAV, is there any way I could use the resampler to convert the original file, first into 24bits/96khz and then compress it again and keep it that way, or it only resamples on the fly while playing it?

Thanks!
Go to the top of the page
+Quote Post
lvqcl
post Dec 2 2009, 18:07
Post #75





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



QUOTE (gecus @ Dec 2 2009, 19:31) *
I am using FLAC files. Will this resampler work with compressed files, or I can only do it in WAV?


This plugin (as almost any DSP plugin) works with any file that foobar2000 can read.
Go to the top of the page
+Quote Post

15 Pages V  < 1 2 3 4 5 > » 
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: 31st July 2014 - 21:18