An open API service indexing awesome lists of open source software.

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.

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