https://github.com/victordibia/beats
Nodejs (javascript) app to extract amplitude data from sound file and infer beats.
https://github.com/victordibia/beats
Last synced: 3 months ago
JSON representation
Nodejs (javascript) app to extract amplitude data from sound file and infer beats.
- Host: GitHub
- URL: https://github.com/victordibia/beats
- Owner: victordibia
- Created: 2016-11-20T15:45:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-27T06:33:37.000Z (over 9 years ago)
- Last Synced: 2025-09-05T13:51:38.965Z (10 months ago)
- Language: JavaScript
- Size: 848 KB
- Stars: 41
- Watchers: 4
- Forks: 28
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Extract Peaks from Audio File

> Nodejs app to process a sound file, identify peaks
[Blog post here](http://denvycom.com/blog/detect-beats-extract-amplitude-data-from-an-audio-file-using-nodejs/)
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.
## How It Works
- 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
# Dependencies List
- [web-audio-api](https://www.npmjs.com/package/web-audio-api) : implementation (partial) of the HTML5 web audio api, used to decode sound files.
- [underscorejs](https://www.npmjs.com/package/underscore) : functional programming helper library for data manipulation.
# Next Steps
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.
## License
MIT License