onsets_detection

onsets_detection(y: npt.ArrayLike, sr: int, write_to_wav: bool = False)

circle-info

Function description

To show onsets of the input signal with time axis and modify the .wav with onset click sounds

circle-info

Parameter

y: input signal

sr: sampling rate (22050 Hz by default)

save_to_wav: to add onset click sounds (not to store by default)

circle-info

Return

None

circle-info

Example

from audioviz import *
import librosa
import numpy as np
from audioviz import BeatAnalysis

y, sr = librosa.load('Mozart_Turkish_March.wav', duration = 45)
BeatAnalysis.onsets_detection(y = y, sr = sr)

Last updated