Jump to content

Spectrogram

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 87.114.146.27 (talk) at 08:42, 21 December 2008. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A spectrogram of violin playing with linear frequency on the vertical axis and time on the horizontal axis. The bright lines show how the spectral components change over time. The intensity coloring is logarithmic (black is −120 dBFS).

A spectrogram is an image that shows how the spectral density of a signal varies with time. Also known as spectral waterfalls, sonograms, voiceprints, or voicegrams, spectrograms are used to identify phonetic sounds, to analyse the cries of animals, and in the fields of music, sonar/radar, speech processing, seismology, etc. The instrument that generates a spectrogram is called a spectrograph or sonograph.

Format

A spectrogram of an FM signal.

The most common format is a graph with two geometric dimensions: the horizontal axis represents time, the vertical axis is frequency; a third dimension indicating the amplitude of a particular frequency at a particular time is represented by the intensity or colour of each point in the image.

There are many variations of format: sometimes the vertical and horizontal axes are switched, so time runs up and down; sometimes the amplitude is represented as the height of a 3D surface instead of color or intensity. The frequency and amplitude axes can be either linear or logarithmic, depending on what the graph is being used for. For instance, audio would usually be represented with a logarithmic amplitude axis (probably in dB), and frequency would be linear to emphasize harmonic relationships, or logarithmic to emphasize musical, tonal relationships.

Generation

Spectrogram of a male voice saying "tatata"
Spectrogram of a Japanese woman saying "minato"

Spectrograms are usually created in one of two ways; either with a series of bandpass filters, or calculated from the time signal using the short-time Fourier transform (STFT).

The filter method is usually used in the analog, continuous version of measurement. Such methods were the only way to obtain a spectrogram before the advent of modern digital signal processing and would record the spectrogram as an image on paper such as is shown at the right. The frequency range of the signal (an audio signal, for instance, would have frequencies in the range of 20 Hz - 20 kHz) is divided into equal sections, either linearly (0-100, 100-200, 200-300, ...), or logarithmically (10-100, 100-1000, 1000-10000, ...). The signal is input to a corresponding filter, which removes most of the signal that does not fall within its frequency band (imperfect window functions and limited frequency resolution will cause some "bleeding" between adjacent frequency bands). The magnitudes of each filter's output are recorded as functions of time. Each recording then corresponds to a horizontal line in the image; a measurement of magnitude versus time for a specific frequency band.

To calculate the spectrogram using the magnitude of the STFT is usually a digital process. Digitally sampled data, in the time domain, is broken up into chunks, which usually overlap, and Fourier transformed to calculate the magnitude of the frequency spectrum for each chunk. Each chunk then corresponds to a vertical line in the image; a measurement of magnitude versus frequency for a specific moment in time.[1]

The spectrums or time plots are then "laid side by side" to form the image or a three-dimensional surface.

The spectrogram is given by the squared magnitude of the STFT of the function:

Applications

File:Spectrogram - Aphex Twin - Windowlicker.png
Spectrograph of Aphex Twin's "mathematical equation" track from Windowlicker
  • Early analog spectrograms were applied to the study of bird calls, with current research continuing using modern digital equipment[2] and applied to all animal sounds. It is especially useful for studying frequency modulation in animal calls.
  • Spectrograms are useful in assisting the overcoming of speech defects and in speech training for that portion of the population that is profoundly deaf[3]
  • The studies of phonetics and speech synthesis are often facilitated through the use of spectrograms[4][5].
  • By reversing the process of producing a spectrogram, it is possible to create a signal whose spectrogram is an arbitrary image. This technique can be used to hide a picture in a piece of audio and has been employed by several electronic music artists[6]. See also steganography.
  • Some modern music is created using spectrograms as an intermediate medium; changing the intensity of different frequencies over time, or even creating new ones, by drawing them and then inverse transforming. See Audio timescale-pitch modification and Phase vocoder.
  • Spectrograms can be used to analyse the results of passing a test signal through a signal processor such as a filter in order to check its performance[7].

Limitations

From the formula above, it can be seen that a spectrogram contains no information about the phase of the signal that it represents. For this reason, it is not possible to reverse the process and generate a copy of the original signal from a spectrogram, though in situations where phase is unimportant (of which audio is often one), it may be possible to generate a useful approximation of the original signal. The Analysis & Resynthesis Sound Spectrograph is an example of a computer program that attempts to do this.

See also

References

External links