:orphan: Example gallery =============== Short programs, grouped by task. The documentation build runs every one of them and fails if one raises or an assertion in it stops holding, so each plot and audio player below is the output of the code on its page. All signals are generated in the code, so a page can be copied and run with no audio files. The longer explanations are in the :doc:`tutorials `. Each section below lists the notebooks that cover its topic. For the same tasks in Rust, see the gallery chapter of the crate's book. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. thumbnail-parent-div-close .. raw:: html
Loading and saving ------------------ Reading and writing WAV and FLAC files. See also the tutorial :doc:`Quantisation and dither ` for what the sample types mean. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /gallery/loading_saving/images/thumb/sphx_glr_plot_read_and_write_thumb.png :alt: :doc:`/gallery/loading_saving/plot_read_and_write` .. raw:: html
Read and write WAV and FLAC
.. raw:: html
.. only:: html .. image:: /gallery/loading_saving/images/thumb/sphx_glr_plot_stream_a_long_file_thumb.png :alt: :doc:`/gallery/loading_saving/plot_stream_a_long_file` .. raw:: html
Read a long file in blocks
.. thumbnail-parent-div-close .. raw:: html
Spectrograms ------------ Time-frequency representations. See also the tutorials :doc:`The DFT, windows and leakage ` and :doc:`STFT and spectrograms `. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /gallery/spectrograms/images/thumb/sphx_glr_plot_constant_q_thumb.png :alt: :doc:`/gallery/spectrograms/plot_constant_q` .. raw:: html
Constant-Q transform
.. raw:: html
.. only:: html .. image:: /gallery/spectrograms/images/thumb/sphx_glr_plot_stft_spectrogram_thumb.png :alt: :doc:`/gallery/spectrograms/plot_stft_spectrogram` .. raw:: html
STFT spectrogram
.. thumbnail-parent-div-close .. raw:: html
Mel and MFCC ------------ Perceptual frequency scales and the features built on them. See also the tutorial :doc:`Cepstrum, mel and MFCC ` and :doc:`Psychoacoustics and codecs `. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /gallery/mel_mfcc/images/thumb/sphx_glr_plot_chroma_thumb.png :alt: :doc:`/gallery/mel_mfcc/plot_chroma` .. raw:: html
Chroma
.. raw:: html
.. only:: html .. image:: /gallery/mel_mfcc/images/thumb/sphx_glr_plot_mel_spectrogram_thumb.png :alt: :doc:`/gallery/mel_mfcc/plot_mel_spectrogram` .. raw:: html
Mel spectrogram
.. raw:: html
.. only:: html .. image:: /gallery/mel_mfcc/images/thumb/sphx_glr_plot_mfcc_thumb.png :alt: :doc:`/gallery/mel_mfcc/plot_mfcc` .. raw:: html
MFCC
.. raw:: html
.. only:: html .. image:: /gallery/mel_mfcc/images/thumb/sphx_glr_plot_perceptual_scales_thumb.png :alt: :doc:`/gallery/mel_mfcc/plot_perceptual_scales` .. raw:: html
Perceptual scales, loudness weighting and mu-law
.. thumbnail-parent-div-close .. raw:: html
Pitch ----- Estimating the fundamental frequency. See also the tutorials :doc:`Pitch: autocorrelation and YIN ` and :doc:`LPC and formants `. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /gallery/pitch/images/thumb/sphx_glr_plot_harmonics_thumb.png :alt: :doc:`/gallery/pitch/plot_harmonics` .. raw:: html
Harmonics of a tone
.. raw:: html
.. only:: html .. image:: /gallery/pitch/images/thumb/sphx_glr_plot_yin_and_pyin_thumb.png :alt: :doc:`/gallery/pitch/plot_yin_and_pyin` .. raw:: html
Pitch tracking with YIN and pYIN
.. thumbnail-parent-div-close .. raw:: html
Beats and onsets ---------------- Finding note starts and the pulse of a recording. See also the tutorial :doc:`Onsets and tempo `. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /gallery/beats_onsets/images/thumb/sphx_glr_plot_beat_tracking_thumb.png :alt: :doc:`/gallery/beats_onsets/plot_beat_tracking` .. raw:: html
Beat tracking and tempo
.. raw:: html
.. only:: html .. image:: /gallery/beats_onsets/images/thumb/sphx_glr_plot_onset_detection_thumb.png :alt: :doc:`/gallery/beats_onsets/plot_onset_detection` .. raw:: html
Onset detection
.. raw:: html
.. only:: html .. image:: /gallery/beats_onsets/images/thumb/sphx_glr_plot_tempogram_thumb.png :alt: :doc:`/gallery/beats_onsets/plot_tempogram` .. raw:: html
Tempogram
.. thumbnail-parent-div-close .. raw:: html
Separation ---------- Splitting a signal into parts. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /gallery/separation/images/thumb/sphx_glr_plot_hpss_thumb.png :alt: :doc:`/gallery/separation/plot_hpss` .. raw:: html
Harmonic and percussive separation
.. thumbnail-parent-div-close .. raw:: html
Effects ------- Dynamics, time and pitch changes, fades and silence. See also the tutorials :doc:`Dynamics ` and :doc:`Short-time energy, zero crossings and VAD `. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /gallery/effects/images/thumb/sphx_glr_plot_compressor_and_limiter_thumb.png :alt: :doc:`/gallery/effects/plot_compressor_and_limiter` .. raw:: html
Compressor and limiter
.. raw:: html
.. only:: html .. image:: /gallery/effects/images/thumb/sphx_glr_plot_silence_and_speech_thumb.png :alt: :doc:`/gallery/effects/plot_silence_and_speech` .. raw:: html
Trim silence and find active regions
.. raw:: html
.. only:: html .. image:: /gallery/effects/images/thumb/sphx_glr_plot_time_stretch_and_pitch_shift_thumb.png :alt: :doc:`/gallery/effects/plot_time_stretch_and_pitch_shift` .. raw:: html
Time stretch and pitch shift
.. thumbnail-parent-div-close .. raw:: html
Resampling ---------- Changing the sample rate, alone or in a batch. See also the tutorials :doc:`Sampling and aliasing ` and :doc:`Resampling `. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /gallery/resampling/images/thumb/sphx_glr_plot_batch_with_threads_thumb.png :alt: :doc:`/gallery/resampling/plot_batch_with_threads` .. raw:: html
Process many clips with threads
.. raw:: html
.. only:: html .. image:: /gallery/resampling/images/thumb/sphx_glr_plot_resample_qualities_thumb.png :alt: :doc:`/gallery/resampling/plot_resample_qualities` .. raw:: html
Resampling quality
.. thumbnail-parent-div-close .. raw:: html
Filters ------- IIR filters and parametric EQ. See also the tutorials :doc:`Convolution and FIR filters ` and :doc:`IIR filters `. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /gallery/filters/images/thumb/sphx_glr_plot_lowpass_and_highpass_thumb.png :alt: :doc:`/gallery/filters/plot_lowpass_and_highpass` .. raw:: html
Low-pass and high-pass filters
.. raw:: html
.. only:: html .. image:: /gallery/filters/images/thumb/sphx_glr_plot_parametric_eq_thumb.png :alt: :doc:`/gallery/filters/plot_parametric_eq` .. raw:: html
Parametric EQ
.. thumbnail-parent-div-close .. raw:: html
Plotting -------- ``audio_samples.mpl`` has ready-made Matplotlib figures for ``AudioSamples``. It needs ``pip install "audio_samples[mpl]"``. Every function accepts ``ax=`` to draw into an existing figure and ``style=`` to change the look. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /gallery/plotting/images/thumb/sphx_glr_plot_overview_dashboard_thumb.png :alt: :doc:`/gallery/plotting/plot_overview_dashboard` .. raw:: html
One-call overview
.. raw:: html
.. only:: html .. image:: /gallery/plotting/images/thumb/sphx_glr_plot_stereo_channels_thumb.png :alt: :doc:`/gallery/plotting/plot_stereo_channels` .. raw:: html
Stereo channels
.. raw:: html
.. only:: html .. image:: /gallery/plotting/images/thumb/sphx_glr_plot_waveform_and_spectrum_thumb.png :alt: :doc:`/gallery/plotting/plot_waveform_and_spectrum` .. raw:: html
Waveform, spectrum and spectrogram
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: :includehidden: /gallery/loading_saving/index.rst /gallery/spectrograms/index.rst /gallery/mel_mfcc/index.rst /gallery/pitch/index.rst /gallery/beats_onsets/index.rst /gallery/separation/index.rst /gallery/effects/index.rst /gallery/resampling/index.rst /gallery/filters/index.rst /gallery/plotting/index.rst