Time-Frequency Domain
STFT¶
Signals can be represented in the so called time-frequency-domain. This can be useful for calculations and signal manipulations, as well as for visualization, since this shows the evolution of a signal's spectrum over time. This visual representation is referred to as spectrogram. The short-time Fourier transform (STFT) devides a signal into overlapping segments - or frames - of equal length and calculates a Fourier transform for each frame.
Typical framesizes $L_f$ range from $10$ to $40\ \mathrm{ms}$. Overlaps vary from $0$ percent to $90$ percent.
The larger the frames, the better the frequency resolution. The larger the overlap, the better the time resolution.
Violin¶
For musical sounds with a pitch, the spectrogram shows the individual partials as prominent horizontal lines. The following spectrogram of a violin sound, recorded with a sampling rate of $f_s = 96\ \mathrm{kHz}$ is calculated with a framesize of $4096$ samples and an overlap of $2048$ samples:
Kick Drum¶
The essential part of a typical electronic kick is a single sine wave, dropping in frequency from about $200\ \mathrm{Hz}$ to about $60\ \mathrm{Hz}$:
Drums¶
Other percussive elements contain so called transients - short regions of noise or rapid fluctuations. Snare drums thus appear in a spectrogram as vertical lines, as this short drum solo shows: