Skip to content

JMPerez/beats-audio-api

gh-pages
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Calculating BPM using Javascript and the Spotify Web API

This project uses the browser's Audio API to guess the tempo of a song, processing a chunk of 30 seconds of music. For more information, read the blog post Beat Detection Using JavaScript and the Web Audio API, from where I've taken the code to perform the track analysis. I have also written a post explaining the project more in depth.

Demo

You can see a demo on https://jmperezperez.com/beats-audio-api

You can search for any track in the Spotify's catalog, and display a diagram of the detected peaks. Then, click on 'Play' to listen to the song while seeing an indicator on top of the peaks diagram. Apart from the detected tempos, the tempo provided by Spotify is shown.

Screenshot of the BPM detector

Run it yourself

There are no dependencies to install, and you don't need to register any app on Spotify. Just clone the project and start a server.

About

Calculate the BPM of a song using the Audio API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published