/beat_detection

A fast beat detection algorithm in Python.

Primary LanguagePython

Beat Detection Algorithm (Python)

A beat detection algorithm written in python.

Documentation is available in the doc folder with an explanation of the algorithm.

Usage

import librosa
import lib.beat as beat

# Load the song from a mp3 file
y, sr = librosa.load('song.mp3')

# Detects the beat in the sub and low frequencies
beats = beat.detect_combi_beats(y, sr)

A More complex is also available here. This example syncs the beats with the audio and plays the song.

Libraries used

Library Module Description
scipy src Used for filtering
numpy src Used for array operations
librosa example Used to load the song
simpleaudio example Used to play the audio
time example Used to sync the beats
matplotlib doc Used to plot the results

References