Re: [linux-audio-dev] Resampling

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Resampling
From: Benno Senoner (sbenno_AT_gardena.net)
Date: Fri Aug 03 2001 - 20:40:19 EEST


On Wed, 01 Aug 2001, you wrote:
> Hi Juhana,
>
> sorry with all that gui discussion I totally forgot about this email.
>
> > What exactly is the algorithm? Does it do a good job? How have you
> > tested it?
>
> I just do an n-times oversampling DFT. You can configure blocksize
> and oversampling(overlap) factor. Then for the resampling process
> I just add/remove bands in the frequency domain and then do resynthesis.
> Thats it. In the oversampling and resynthesis code I use Hanning windows.
> It's all done in float precision atm. For FFT I use the fftw lib, which
> is really fast. So I can do 32times oversampling with 16384 samples
> blocks in realtime on a celeron 300. But you don't really need that
> 8-times oversampling with 1024 samples windows is really enough to
> get good sounding quality. I never did a frequency analysis on my
> results, only listening tests and I like the result. If someone
> feels like thoroughly analyzing it, go ahead :)
>

I wrote a weighted overlap-add STFT filter (based on FFT)as part of a small
project for an university's exam (passed 1 week ago :-) ).
I did some analysis and a brickwall filter using a blackman window for
analysis and synthesis with 8-way overlapping gives me S/N ratio of about
85-90dB or so.
So with the right params the filter should produce good results.

Alex, I'm not sure if I understood the functioning of your resampler correctly:
can you specify only integer factors or fractional values too ?

If it's integer only, then yes it will be really easy to implement and the
quality will be good.
For fractional values I have no clue how to do this (eg: "resample the
frequency bands ? ))

Personally I prefere resampling in the time domain using polynomial functions ..
the problem is downsampling: if you do not filter prior the interpolation you
risk to run into aliasing problems.
One could prefilter the signal but I'm currently not sure what the best
tradeoff from a quality/cpu load POV would look like.
FFT even if fftw is fast, with 8way overapping you would not be able to do more
than 1-2 streams on realtime on a PIII box.

I'm not interested in high quality offline resampling (like in an audio editor)
but more in the resampling algorithms used in softsynth.
AFAIK almost none uses the sinc interpolation since it is too cpu hungry.
Most softynths work without any filtering otherwise they would not achieve
50-100 voices on a PII/III box.

Perhaps an IIR filter would suffice ? We had a similar discussion (fast
interpolation) on music-dsp some time ago but no clear response came out.

Some time ago I tried to play a high freq sinewave on some softsynths for
windows .. (eg. reaktor, reality) : all of them produced aliasing noise with
indicates that they are not using any filtering.

cheers,
Benno.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Aug 03 2001 - 19:55:37 EEST