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

Re: Resampler plugin

Reply #75
Thanks lvqcl. Another question, how can I learn to use your program. I have downloaded your component and installed it in Foobar...now, I have no idea how to make it work. Are there any posts out there explainig how to use it? I am not a developper as most of the people in this Forum.
I would like to convert my current 16bits/44.1khz files into 24bits/96khz or higher sampling.
How could I learn how to use your tool?

Thanks again!

Re: Resampler plugin

Reply #76
Thanks lvqcl. Another question, how can I learn to use your program. I have downloaded your component and installed it in Foobar...now, I have no idea how to make it work. Are there any posts out there explainig how to use it? I am not a developper as most of the people in this Forum.
I would like to convert my current 16bits/44.1khz files into 24bits/96khz or higher sampling.

In Foobar, File-->Preferences-->DSP Manager--> I activated Resampler (SoX) --> Configuration/Resampler Settings:

Target Samplerate: 96000 Hz / Quality: Very High

Passband: the default is 95%
I allowed alliasing for faster response...?
Phase response: Linear

My ssystem also allows up to 192Khz...would this be better?

Would this make sense?

Do I set up the 24 bits on the Output data format: 24 bits and that's all?


Thanks again! And sorry to everybody if my questions sound too obvious...

Re: Resampler plugin

Reply #77
I hope you understand that 24/96 files will have the same quality than original 16/44?

But if you want to do so, just use foobar2000 converter: add SoX resampler into DSP chain and configure it as you wish.

If you don't know how to use converter... my english is quite limited and I think I cannot describe this to you in detail. Maybe it's better to ask someone else about converter.

Re: Resampler plugin

Reply #78
Allow aliassing or not?
:\ i dont know what is better

Re: Resampler plugin

Reply #79
Hi Ivqcl,

Would it be possible to add a mode that bypassed the filter completely?
(I would like to try some up and down sampling with my own filters)


All the best

Herbeck

Re: Resampler plugin

Reply #80
Would it be possible to add a mode that bypassed the filter completely?
(I would like to try some up and down sampling with my own filters)

Just remove the plugin from DSP chain. Or set output samplerate equal to input samplerate.

Re: Resampler plugin

Reply #81
Would it be possible to add a mode that bypassed the filter completely?
(I would like to try some up and down sampling with my own filters)

Just remove the plugin from DSP chain. Or set output samplerate equal to input samplerate.

 

I want to change the sample rate but without the low pass filter.
I know this is an odd request, and the sound will be awful.
But I would like to try some ideas with another low pass filter.

Herbeck

Re: Resampler plugin

Reply #82
You see, lowpass filter is integrated into SoX routines that I use, and I don't fully understand all those algorithms. I'd rather not touch them.

You can try foo_dsp_src9 with "ZOH Interpolator" and 2x/3x/4x/... upsampling.

Re: Resampler plugin

Reply #83
Hi Ivqcl,

I have already tried it, but it messes up the bitrates and have a little slope on the passband.
But otherwise it is the kind of SRC I am locking for.

So if you know someone who can disable the low pass filter in sox,
or have another idea how to solve this, please let me know.


Many thanks

Herbeck

Re: Resampler plugin

Reply #84
I don't get the point of disabling the low pass filter. It should only be filtering to the Nyquist frequency for the target sample rate you choose. Plus, it's not like an upsampling filter can magically introduce high frequency content above the Nyquist frequency for your source sample rate. Anything above that would be aliasing.

Re: Resampler plugin

Reply #85
That's how foo_dsp_src9 works for 2x up- and downsampling. (44.1 -> 88.2 and 44.1 -> 22.05 kHz).

Original signal:



Upsampled signal:



Downsampled signal:



Is this what you want?

Re: Resampler plugin

Reply #86
Hi Ivqcl,

Thank you for trying to help me with this odd request.
But the foo_dsp_src9 is not good enough for what I am trying to do.

If you do a simple test with foo_dsp_src9 and upsample a 44.1 file to 88.2 and then back to 44.1.
Then you will find that the converted file is smaller than the original file.
Like I said it messes up the bitrate.

And the slope on the passband you can see in this SRC Comparison (http://src.infinitewave.ca/)

Sox is very good for a freeware, but I use iZotope 64-bit SRC for up and down sampling.
The filter in a SRC is what make the big deferens between different SRC's.
The low pass filter I want to try is a linear phase filter but with less preringing than the one in Sox and iZotope.

I am not even close to have the knowledge to make my own SRC.
So what I am looking for is a good SRC without the lowpass filter.
And then let the SRC do the math so I can add the low pass filter manually.


Thanks again and all the best

Herbeck

Re: Resampler plugin

Reply #87
Quote
I am not even close to have the knowledge to make my own SRC.


For N x upsampling without filter, all you need is to insert (N-1) null samples after each input sample.

Re: Resampler plugin

Reply #88
Yes, but I also need to be able to convert from lets say 192Khz to 44.1Khz,
and to make a program of it with an easy workflow.
By the way that is what I like so much with your Sox plug, the easy workflow.

I am simply not a programmer.

If you can help me with this, I am willing to donate some money, because I really want to
try this filter that I wrote about on a SRC.

Don't take me wrong, I'm not rich, I'm talking about a symbolic sum to show my appreciation.


Herbeck


Re: Resampler plugin

Reply #89
I'm not a programmer too, I just know C++ a little. 

Try this simple plugin. It adds 2 entries to DSP: "2x upsample w/o lpf" and "2x downsample w/o lpf".

Re: Resampler plugin

Reply #90
Hi Ivqcl,

If you use your "2x upsample w/o lpf" and look at the upsampled file at a sample level,
you will se that every second sample is missing, and the volume is half of the original file.

But it looks really cool I've never seen anything like it. 

I think upsampling is pretty strait forward compared to downsampling.
Pretty much what you have done in "2x upsample w/o lpf", but without the gaps between the samples.
I've had the impression that down sampling is more complicated.

But I don't know, and I've been wrong before.

Hebeck

Re: Resampler plugin

Reply #91
Or maybe this is exactly how it should look like before the low pass filter is added.
Like I said, I've been wrong before.

but I had to add two of the upsampled files to get the original file volume before I added the filter.
And of course the gaps between the samples were gone after I added the filter.

If there were no gaps the "2x upsample w/o lpf" would have added something that wasn't there
from the beginning.

But it looked so weird I thought some thing is wrong.

I'm a little busy for a couple of days, but I'll be doing some test as soon as I can.



Thank you again Ivqcl !!!!


Herbeck


Re: Resampler plugin

Reply #92
"Sample rate conversion process often adjusts peak structure of the original program material"  -Aleksey Vaneev

This is what the "2x upsample w/o lpf" is lacking.

However, I was able to do some tests thanks to your little plugin, and it looks promising.
So now I'm eager to find out if it's possible to bypass the lowpass filter in Sox.

I've seen you mention a member that calls him/herself "Bandpass".
Do you think "Bandpass" would be able to help me with this issue.


In other words, can Bandpass bypass the lowpass? 


All the best

Herbeck

Re: Resampler plugin

Reply #93
"Sample rate conversion process often adjusts peak structure of the original program material"  -Aleksey Vaneev

This is what the "2x upsample w/o lpf" is lacking.

That's because it doesn't have lowpass filter 

I've seen you mention a member that calls him/herself "Bandpass".
Do you think "Bandpass" would be able to help me with this issue.


In other words, can Bandpass bypass the lowpass?

I doubt it, but you can ask him directly: his profile

Re: Resampler plugin

Reply #94
thanks for the sse2 version

Re: Resampler plugin

Reply #95
SSE2 version is available (see the 1st post). It works ca. Up to 10% faster than the default one.


Great!  Mod version from a few posts up in the pipeline?

Adriaan.

Re: Resampler plugin

Reply #96
I just wanted to say thanks for this. You rock lvqcl.

Re: Resampler plugin

Reply #97
Well done and thank you for your effort.

Re: Resampler plugin

Reply #98
Would you please add one more configuration setting, which do upsample 4x for [0, 48]kHz and 2x for (48, 96]kHz source.

Thanks.

Re: Resampler plugin

Reply #99
Would you please add one more configuration setting, which do upsample 4x for [0, 48]kHz and 2x for (48, 96]kHz source.

Thanks.


You can do this with SoX_resampler_mod.

Just add 2 resamplers to DSP chain. First makes 4x upsampling and passes 64000,88200,96000 unmodified. Second makes 2x upsampling and passes 128000,176400,192000 unmodified.