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: Juhana Sadeharju (kouhia_AT_nic.funet.fi)
Date: Wed Aug 08 2001 - 21:52:01 EEST


>From: Alexander Ehlert <alexander.ehlert_AT_uni-tuebingen.de>
>
>> 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.
>
>Yeah, you would a sinc interpolation with folding anyway and for that
>you use the fft overlap method too. The DSP Guide at www.dspguide.com
>has a real good explanation, how to avoid time aliasing problems.

In sampling synths they use simple 2-7 tap interpolators.
I guess sinc could used too with an appropriate windowing
because I have read that Lagrange interpolation can be estimated
by windowing the sinc. When filter order grows to infinity,
Lagrange approaches sinc, but that is slightly different story
than windowing. I'm still searching paper for the proof.

E-mu interpolator is of order 7, and is of the optimized type (not
windowed or polynomial). They used either remez or an other algorithm
(have not yet a paper for this latter algorithm); they get the filter
better (than plain remez solution) because they noticed (and patented)
that frequencies near nyquist rate are less important for audio and used
that fact in the design.

>> 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.
>
>Yeah, but IIR can be a bit unstable with the time. I have implemented

What kind of interpolator was asked in music-dsp? Perhaps in some
other context then they offered spline/cubic interpolator. Would
that work for this purpose?

>lowpass/highpass/bandpass. But it could do more. But I have to use
>double precision internally to get numerical stability. Just using
>float tends to muck around with some filter coefficients.

I'm about to examine these float/double issues for IIR filters in any
day now. I just wrote an IIR core as well.

>FIR is a good alternative, but you have to do a compromise. Numerical
>stability(FIR), good performer(IIR) ?

For sample rate converter (not for sampling synth interpolator),
FIR filter is a must because they can be made linear-phase easily.
There are near linear-phase IIR filters which could be used, but
I have not yet read about them that much that I could write code
for you.

How this FFT system works again? If you use 1024 length windows in
analysis, then can you increase the sample rate by using 4096 length
windows in synthesis? I.e., 1024-<removed bands> frequency pins are
copied to first pins of the 4096 FFT array, and rest pins are set to
zero...? If you do this kind of upsampling, then you could generate any
sample rate ratio by using an interpolation in time domain. I can
provide you a Lagrange interpolator code for making the interpolation;
it is coded already.

Regards,

Juhana


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

This archive was generated by hypermail 2b28 : Wed Aug 08 2001 - 18:52:25 EEST