Getting spectral data from sound
PCM sound representation is good for sound storage and playing. It lets us operate sound samples like a piece of magnetic tape—to cut, shuffle its parts, reverse, and glue back together. Also it lets us change and measure the overall volume of the sound. But PCM is inadequate for more advanced sound analysis and processing. The reason being that humans cannot hear separate audio samples, only frequencies in sound in short time intervals. The collection of amplitudes of each frequency in a short time interval is called spectrum of the sound. Therefore, sound processing methods should work using frequencies-spectrum language. This differs sound processing from image and video processing as they work well with pixels independently.
In this section, we will not dip into the mathematical aspects of spectrum computing, but will learn how to compute it using the openFrameworks functions and use it in projects.
The spectrum in openFrameworks is calculated for sound...