Spectrum Analyzer
This audio spectrum analyzer enables you to see the frequencies present in audio recordings.
The spectrum analyzer above gives us a graph of all the frequencies that are present in a sound recording at a given time. The resulting graph is known as a spectrogram. The darker areas are those where the frequencies have very low intensities, and the orange and yellow areas represent frequencies that have high intensities in the sound. You can toggle between a linear or logarithmic frequency scale by ticking or unticking the logarithmic frequency checkbox.
In many ways, this demo is similar to the Virtual Oscilloscope demo, but there is a crucial and very important difference. In the oscilloscope demo, the plot shows the displacement of an audio signal versus the time, which is called the time-domain signal. This demo shows the signal represented in a different way: the frequency domain. The frequency spectrum is generated by applying a Fourier transform to the time-domain signal.
The demo above allows you to select a number of preset audio files, such as whale/dolphin clicks, police sirens, bird songs, whistling, musical instruments and even an old 56k dial-up modem. Each of these has unique and interesting patterns for you to observe. Additionally, you can upload your own audio files. To view the spectrogram, choose your sound input, then click the play button and the graph will appear on the screen, moving from right to left. You can stop the motion by clicking the pause button on the audio player.
The violin recording in particular clearly demonstrates the rich harmonic content for each note played (this appears on the spectrogram as multiple higher frequencies being generated for each fundamental frequency). This is in contrast to the whistling recording which has a very strong fundamental component, and has only one additional harmonic, indicating that a human whistle is very close to a pure sine wave.
Here are some links to sites that have interesting sound files with which you can generate your own spectrograms.
- Xeno-canto - A very large database of bird calls from around the world
- Underwater sounds recorded in Glacier Bay
Please note, we are aware of an issue with the Safari browser which stops the spectrogram from appearing. In addition to this, Internet Explorer does not yet have the features to support the demo. Therefore, for best results, please use Chrome or Firefox. Thank you.
Credits
- The code for creating the spectrograms borrows heavily from this work by Boris Smus.
- Song Thrush recording by Patrik Ã…berg, XC26981. Accessible at xeno-canto.org/26981
- Orca recording from nps.gov/glba/naturescience/soundclips.htm
- Modem recording by BlueNeon, from freesound.org/people/BlueNeon/sounds/203512/
- Violin recording by FreqMan, from freesound.org/people/FreqMan/sounds/25481/
- Sad Trombone by kirbydx from freesound.org/people/kirbydx/sounds/175409/
- Police Siren recording by Vlammenos, from soundbible.com/581-Police-Siren-3.html