Skip to content
/ beats Public
forked from victordibia/beats

Nodejs (javascript) app to extract amplitude data from sound file and infer beats.

Notifications You must be signed in to change notification settings

kaumudpa/beats

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extract Peaks from Audio File

Nodejs app to process a sound file, identify peaks

Blog post here

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 : implementation (partial) of the HTML5 web audio api, used to decode sound files.
  • underscorejs : 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

About

Nodejs (javascript) app to extract amplitude data from sound file and infer beats.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%