#-*- mode: org -*-
Libtfr is a library for calculating multi-taper conventional and time-frequency reassignment (TFR) spectrograms.
Mainly for readability. Compare the conventional windowed spectrogram on the right with the reassignment spectrogram on the right (click to see more detail).
The spectral energy distribution is much sparser in the second image, and it’s easier to see the high-frequency trill (the tone that’s rapidly modulated up and down) right in the middle of the sound. For some applications, reassignment spectrograms can provide much more precise measurements.
It’s important to note that no signal processing tricks can do away with the fundamental tradeoff in time-frequency resolution. In the images above, the trill gets close enough to the lower-frequency tonal component that the two start to smear together. Spectral resolution can only be increased by increasing the size of the analysis window, which reduces temporal resolution.
It’s fast. The library is written on top of the FFTW library, one of the fastest Fourier transformation libraries, and the wrapping code is written in lightweight C99 code. On a reasonably modern processor, libtfr can calculate a multitaper reassignment spectrogram in 1/2 to 1/4 of the duration of the signal, making it usable for realtime applications.
It’s convenient. The library is well-documented and comes with python and MATLAB interfaces.
It’s free and open-source.