Re: [Alsa-user] multichannel multiband FFT-based equalizer - README
Brought to you by:
perex
|
From: Sergei S. <ste...@li...> - 2006-01-03 01:12:34
|
Fons, when I said "central frequencies" I meant the frequencies which can be reproduced exactly using one direct DFT and one inverse DFT buffer. That is, I claim that for the 8 points DFT/FFT example I gave if input signal contains only 0 * Fs / 8 1 * Fs / 8 2 * Fs / 8 3 * Fs / 8 frequencies, i.e if it is periodic band limited signal, it can be reproduced with infinite precision (provided calculations are infinitely precise) using only one 8-element array. Any other signal, even if it is band limited, can not be reproduced precisely using only one 8-element array because that signal is not a periodic function with the (4 / Fs) period. Look at this another way. For the small 8 points FFT example one can build at maximum 4-band equalizer with 0 * Fs / 8 1 * Fs / 8 2 * Fs / 8 3 * Fs / 8 central frequencies Any attempt to increase the number of central frequencies will cause ambiguity, or, as you said, "The minimum bandwidth you can make is Fs/N" . My choice of central frequencies means I'm using the strict subset of the maximum number of them - 4 in this example. I know about interpolation, resampling and stuff like that, but it is not what a simple FFT-based equalizer is doing. And yes, you are correct regarding "Yes, except that it's the cosine (real) part of Fs/2, that is in C[4].", though it doesn't change the point. My point was that with an IIR-based equalizer central frequency can really be chosen to have whatever value in 0..Fs/2 range, I mean, the bandpass IIRs can be built that their magnitude maximum will be at really arbitrary value in 0..Fs/2 range, and their Q factor can be made arbitrary high (I mean infinite precision computer arithmetics) - it's not the case with DFT when N is limited. In the IIR case moral equivalent of limited N is limited IIR filter order, still, its resonance frequency can be whatever in 0..Fs/2 range. In the case of DFT limited N means both limited Q and discrete central frequencies in the terms of precise signal restoration. Regards, Sergei. P.S, I've just seen a very good reply from Bill Unruh: http://article.gmane.org/gmane.linux.alsa.user/21688 . On Tue, 3 Jan 2006 01:25:39 +0100 fons adriaensen <fon...@sk...> wrote: > On Tue, Jan 03, 2006 at 01:22:56AM +0200, Sergei Steshenko wrote: > > > - do you agree that if, say, I have an 8 point FFTW, the following > > frequencies are represented in the FFTW output array C (the result of time -> > > frequency conversion, i.e. direct FFT): > > > > C[0] <=> DC (only real part) > > C[1], C[7] <=> 1 * Fs / 8; > > C[2], C[6] <=> 2 * Fs / 8; > > C[3], C[5] <=> 3 * Fs / 8; > > C[4] <=> 4 * Fs / 8; Nyquist frequency (only imaginary part) > > Yes, except that it's the cosine (real) part of Fs/2, that is in C[4]. > > > If yes, do you agree that no SINGLE C-array element represents, say > > 1.5 * Fs / 8 frequency ? > > Yes. > > > If yes, do you agree that changing simultaneously gain of > > C[1], C[7] and C[2], C[6] pairs. i.e of the pairs that represent > > (1 * Fs / 8) and (2 * Fs / 8) pairs I will not only change gain > > of (1.5 * Fs / 8) frequency, but also of the whole > > 1 * Fs / 8) .. (2 * Fs / 8) frequency range ? > > Yes. This is no different from changing only one value - it represents > more than just the exact central frequency (you'd have a very bad equaliser > otherwise !). The minimum bandwidth you can make is Fs/N, and a bit more > with windowing. You may have some difficulty in believing that a 'non-integer' > band could have the same bandwidth as an 'integer' one, but it *is* possible, > and even quite straightforward. > > Look at it like this: there is no essential difference between the time > and the frequency domains, they are 'duals'. Just as you can delay a > sampled signal by half (or any fraction of) a sample by interpolation > and without impairing bandwidth (i.e. resolution in the time domain), > you can interpolate in the frequency domain without impairing resolution. > The output of a DFT is just 'samples in the frequency domain', like the > input is 'samples in the time domain'. > > Or one more variation: you say "no SINGLE C-array element represents, > say 1.5 * Fs / 8 frequency", and that is correct. In the same way, > in a sampled signal, no single sample represents the value of the > original analog signal halfway between samples i and i+1. It is > represented by all surrounding samples, with sin(x)/x weighting. > And it can be reconstructed. The same is true in the frequency domain. > > -- > FA > |