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: Alexander Ehlert (alexander.ehlert_AT_uni-tuebingen.de)
Date: Thu Aug 09 2001 - 11:12:19 EEST


Hi,

> 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.

You can do bilinear filtering with IIR. Just perform the kernel
forwards and backwards on the sampledata. So you get linear phase
again. But if you want to do resampling in a stream, that's probably
not an option.

> 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

Yeah in this case you would increase your sample rate by four.
To downsample I just reduce the blocksize, and this way drop the
coefficients for the higher frequencies and then calculate the
inverse fft just with this new blocks. For upsampling increase
the blocksize and pad the new higher frequencies with zeroes.

> 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

Why 4096 FFT array?? I just use any blocksize. FFTW supports blocksizes
other than exponents of 2. The problem is, that the so called
split radix routines can be really slow. So I'm not actually sure
wether I should torture the user with real high quality converting
rather than do it quick and dirty. Yesterday I imported a 4 Minutes
Stereo mp3 file with 44,1Khz and imported it to 48khz and it took
10 Minutes on my Dual PIII 600. The ifft used a blocksize of 2228
with 8times oversampling. And for this blocksize FFTW performs really bad.
Maybe 8 times oversampling is overkill, too? Benno?

Cheers, Alex

-- 

Soap and education are not as sudden as a massacre, but they are more deadly in the long run. -- Mark Twain


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

This archive was generated by hypermail 2b28 : Thu Aug 09 2001 - 11:14:54 EEST