You're reading an old version of this documentation. If you want up-to-date information, please have a look at 0.10.1.
- class librosa.display.AdaptiveWaveplot(times, y, steps, envelope, sr=22050, max_samples=11025, transpose=False)
A helper class for managing adaptive wave visualizations.
This object is used to dynamically switch between sample-based and envelope-based visualizations of waveforms. When the display is zoomed in such that no more than max_samples would be visible, the sample-based display is used. When displaying the raw samples would require more than max_samples, an envelope-based plot is used instead.
You should never need to instantiate this object directly, as it is constructed automatically by
An array containing the time index (in seconds) for each sample.
An array containing the (monophonic) wave samples.
The matplotlib artist used for the sample-based visualization. This is constructed by
The matplotlib artist used for the envelope-based visualization. This is constructed by
- srnumber > 0
The sampling rate of the audio
- max_samplesint > 0
The maximum number of samples to use for sample-based display.
If True, display the wave vertically instead of horizontally.
- __init__(times, y, steps, envelope, sr=22050, max_samples=11025, transpose=False)
__init__(times, y, steps, envelope[, sr, ...])
connect(ax, *[, signal])
Connect the adaptor to a signal on an axes object.
Disconnect the adaptor's update callback.
Update the matplotlib display according to the current viewport limits.