Friday, July 17, 2015

pd46. Discrete Fourier Transform in Pure Data

For the audio signal of last example, the Discrete Fourier Transform (DFT) is found using rfft~.


The amplitude of the DFT for a blocksize of 1024 is found. The default block size is 64. The amplitude is shown on right channel. Here for each 1024 samples or (1024/44100 seconds), we have Fourier Amplitude of the block.


Even thought the DFT takes only a block, theoretically the block is treated as one period in infinite wave. The left and right boundaries of a block will be different in general. Thus there is a discontinuity as each new period begins, and this affects the Fourier coefficients for high-frequency terms. For realistic analysis, you should window the audio signal with a hamming window, etc. These windows will ensure the two boundaries are near 0 or identically 0. However, this will require overlapping of audio. For 1 minute audio with overlapping of 2, you will have to analyze two minutes.


The left channel shows the input audio signal, which is the same as last example. The right channel show the amplitude of different frequencies.


No comments:

Post a Comment