[Pd] Complex audio signals

Piotr Majdak piotr at majdak.com
Tue Jun 20 10:08:52 CEST 2006


Hi Chuckk,

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. 

Yes.

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

Not really - it depends on the signal. Imagine a simple signal with 
length of 4 samples: [1 0 0 0]. This unit pulse contains all frequencies...


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

If you want to FT a signal you describe and see the harmonics 
differences in the spectrum you need long block sizes. But not due to 
some FT limitations, it's just because you need longer signals in the 
time domain to represent several slightly detuned sines. Taking just 
four samples from such a signal, the information about the sines gets 
lost. This problem is called windowing and the lost of the accuracy 
after the FT is the leakage effect (information of the frequencies gets 
smeared over several bins).

> But it makes sense that, with
> a discrete signal, some combination of possible values from
> neighboring channels would create the same signal.  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?

Yes, sometimes you can interprete data better in the frequency domain 
better.

> Another question: if I just ran rfft~ on a signal, and then ran ifft~
> on the transform, would that create the same signal as a complex
> signal? 

Using [rfft~] you can process real signals only...

> I've been extensively cross-referencing between Miller's Theory and
> Techniques, Erik Spjut's chapter on DSP in the Csound Book, and
> Digital Filters by RW Hamming.  It amazes me that, with the help of
> the other two books and mathworld, I am beginning to comprehend a lot
> of the Hamming concepts, which seemed totally inscrutable last fall.

You are not alone. We all had to start somewhere :-)

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

As Marc wrote you: try Octave...

br, Piotr




More information about the Pd-list mailing list