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 26Frequency domain signalprocessing using pfft~the Y-axis (vertical distance from zero). We’ll learn more about what we can do with thereal <strong>and</strong> imaginary parts of the complex numbers later on in this tutorial.The fftin~ object has a third outlet that puts out a stream of samples corresponding to thecurrent frequency bin index whose data is being sent out the first two outlets (this isanalogous to the third outlet of the fft~ <strong>and</strong> ifft~ objects discussed in Tutorial 25). Forfftin~, this outlet outputs a number from 0 to half the FFT size minus 1. You can convertthese values into frequency values (representing the “center” frequency of each bin) bymultiplying the signal (called the sync signal) by the base frequency, or fundamental, ofthe FFT. The fundamental of the FFT is the lowest frequency that the FFT can analyze,<strong>and</strong> is inversely proportional to the size of the FFT (i.e. larger FFT sizes yield lower basefrequencies). The exact fundamental of the FFT can be obtained by dividing the FFTframe size into the sampling rate. The fftinfo~ object, when placed into a pfft~ subpatch,will give you the FFT frame size, the FFT half-frame size (i.e. the number of bins actuallyused inside the pfft~ subpatch), <strong>and</strong> the FFT hop size (the number of samples of overlapbetween the windowed frames). You can use this in conjunction with the dspstate~ objector the adstatus object with the sr (sampling rate) argument to obtain the base frequency ofthe FFT:Finding the center frequency of the current analysis bin.Note that in the above example the number~ object is used for the purposes ofdemonstration only in this tutorial. When DSP is turned on, the number displayed in thesignal number box will not appear to change because the signal number box by default207

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

Saved successfully!

Ooh no, something went wrong!