Onset detection using high frequency content and hill climbing
Simple onset detector. Detects onsets by finding peaks in high frequency content, and filtering found peaks using hill climbing.
import scipy.io.wavfile
import onsetdetection
sr, audio = scipy.io.wavfile.read('audio.wav')
audio = audio[:,0] # make it mono
onsets = onsetdetection.detect_onsets(audio)
Returns a numpy array of offsets, in samples.
Bello, Daudet, Abdallah, Duxbury, Davies, Sandler: A Tutorial on Onset Detection in Music Signals, 2005