Nodejs app to process a sound file, identify peaks
This project provides Node.js code to decode a sound file, identify peaks, and identify beats. There are some sample code available that demonstrate this using HTML5 webaudio api, but this uses a nodejs port of same api.
- Decode audio file (add one to your sounds folder)
- Identify peaks
- Identify beats
##Running
Note: To ensure correctness, the sound file is played back while being analyzed. ffmpeg is used to play back sound, and this must be installed.
To install ffmpeg on a mac
brew install ffmpeg
Start the application. (Note: you need sudo access)
node beats.js
- web-audio-api : implementation (partial) of the HTML5 web audio api, used to decode sound files.
- underscorejs : functional programming helper library for data manipulation.
Beat extraction. The general approach is to identify peaks most repetitive peaks to be indicative of a beat, and then compute inter-peak interval. Two 60 peaks within a 60 second interval might correspond to 60 beats per minute.
MIT License