[Pd] Complex audio signals

Mathieu Bouchard matju at artengine.ca
Wed Jun 21 05:09:55 CEST 2006


On Mon, 19 Jun 2006, Chuckk Hubbard wrote:

> Okay, I've read through some of the Fourier explanation in this Digital 
> Filters book, and I think I understand.  That was going to be one of my 
> next questions: if the data of the FFT actually has the same number of 
> possibilities as the audio data itself (by bit rate and block size), is 
> there then a 1 to 1 relationship, where no two audio blocks could have 
> the same FFT data.  I take the answer to be yes.

For floats, it's not, but it's not terribly off the mark anyway (just 
rounding error).

The mapping is only perfect in the (Real-based) Complex numbers and also 
in the Algebraic-numbers-based Complex numbers. However those systems are 
more difficult to compute with, so you find them in only a few apps, such 
as Mathematica and Maple. (Not even in Matlab, if I'm not mistaken).

> I was told by an electrical engineer that short block sizes miss lower 
> frequencies, but that seems to be covered with the DC channel, even down 
> to a block size of 4.

Short block sizes miss lower frequencies, but that is irrelevant, because 
such low frequencies are outside the scope of one single block: it's 
cross-block information. You can see a low frequency as an oscillation of 
the DC channel over many blocks.

>  I was a little confused by the possibility of having, for instance, 7 
> oscillators tuned within .001 Hz of each other, since there is only one 
> value for each channel, and I read that FFT is more accurate if the 
> frequency of the sound is known and is in a harmonic relationship with 
> the bins.

FFT gives a perfect spike if the input is a sinusoid of same frequency as 
a bin. If it isn't, the spike will be curved, spilling over many bins. You 
can refine the value of the frequency by looking at the shape of the 
spike, and/or by looking at how the phase of the spike changes from block 
to block.

> So, the idea is just that the transform data is easier to read if there 
> is a harmonic relationship- not that the reconstructed signal will be 
> truer?

The reconstructed signal will be fine. If instead of sin(440t) you get 
sin(420t)+0.2*sin(460t)+0.04*sin(500t)+... (completely made up example) 
then this only means that the latter is the closest approximation to the 
former in the context of that particular block size.

> Too bad I go to an art school that would never pay for MathLab in a
> million years.

What do you need Matlab for?... PureData can do a lot of the job, and if 
it isn't enough, then add GridFlow (which has [#fft]).

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada


More information about the Pd-list mailing list