Gammatone Filterbank Toolkit 1.0

gammatone.plot – Plotting utilities for gammatone analysis

«  gammatone.fftweight – FFT weightings for spectrogram-like gammatone analysis   ::   Contents

gammatone.plot – Plotting utilities for gammatone analysis

Plotting utilities related to gammatone analysis, primarily for use with matplotlib.

class gammatone.plot.ERBFormatter(low_freq, high_freq, *args, **kwargs)

Axis formatter for gammatone filterbank analysis. This formatter calculates the ERB spaced frequencies used for analysis, and renders them similarly to the engineering axis formatter.

The scale is changed so that [0, 1] corresponds to ERB spaced frequencies from high_freq to low_freq (note the reversal). It should be used with imshow where the extent argument is [a, b, 1, 0] (again, note the inversion).

gammatone.plot.gtgram_plot(gtgram_function, axes, x, fs, window_time, hop_time, channels, f_min, imshow_args=None)

Plots a spectrogram-like time frequency magnitude array based on gammatone subband filters.

Parameters:gtgram_function

A function with signature:

fft_gtgram(
wave, fs, window_time, hop_time, channels, f_min)

See gammatone.gtgram.gtgram() for details of the paramters.

gammatone.plot.main()

Entry point for CLI application to plot gammatonegrams of sound files.

gammatone.plot.render_audio_from_file(path, duration, function)

Renders the given duration of audio from the audio file at path using the gammatone spectrogram function function.

«  gammatone.fftweight – FFT weightings for spectrogram-like gammatone analysis   ::   Contents