13.07.2015 Views

Tutorials and Topics - Peabody Computer Music

Tutorials and Topics - Peabody Computer Music

Tutorials and Topics - Peabody Computer Music

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tutorial 25Analysis:Using the FFTIt appears that fft~ has correctly analyzed the signal. There’s just one problem...Practical problems of the FFTThe FFT assumes that the samples being analyzed comprise one cycle of a periodic wave.In our example, the cosine wave was the 10th harmonic of the FFT’s fundamentalfrequency, so it worked fine. In most cases, though, the 512 samples of the FFT will not beprecisely one cycle of the wave. When that happens, the FFT still analyzes the 512 samplesas if they were one cycle of a waveform, <strong>and</strong> reports the spectrum of that wave. Such ananalysis will contain many spurious frequencies not actually present in the signal.• Close the text window of capture~. With the audio still on, set the “Test Frequency”number box to 1000. This also triggers the clear message in the upper left corner of thepatch to empty the capture~ object of its prior contents. Double-click once again oncapture~, <strong>and</strong> scroll ahead in the text window to see its new contents.The analysis of the 1000 Hz tone does indeed show greater energy at 1000 Hz—in the12th <strong>and</strong> 13th frequency regions if your MSP sampling rate is 44,100 Hz—but it alsoshows energy in virtually every other region. That’s because the waveform it analyzed isno longer a sinusoid. (An exact number of cycles does not fit precisely into the 512samples.) All the other energy shown in this FFT is an artifact of the “incorrect”interpretation of those 512 samples as one period of the correct waveform.To resolve this problem, we can try to “taper” the ends of each time slice by applying anamplitude envelope to it, <strong>and</strong> use overlapping time slices to compensate for the use of theenvelope.Overlapping FFTsThe lower right portion of the tutorial patch takes this approach of using overlappingtime slices, <strong>and</strong> applies a triangular amplitude envelope to each slice before analyzing it.(Other shapes of amplitude envelope are often used for this process.198

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!