A JavaScript library that detects the BPM of a song or audio sample using the Web Audio API.
bpm-detective is a JavaScript library that analyzes audio files to detect their beats per minute (BPM). It uses the Web Audio API to process audio buffers and is designed to work with dance or electronic music, providing a simple way to extract tempo information programmatically.
Web developers and audio engineers building music analysis tools, DJ applications, or interactive audio experiences in the browser.
It offers a lightweight, focused solution for BPM detection without complex dependencies, making it easy to integrate into web-based audio projects with minimal setup.
Detects the BPM of a song or audio sample
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages the browser's native Web Audio API for efficient audio buffer analysis, reducing performance overhead and dependency on external libraries.
Exports a single function that takes an AudioBuffer, making it easy to integrate with minimal code and setup, as shown in the README example.
Optimized for 90-180 BPM, ensuring reliable detection for dance and electronic music genres, which is explicitly stated in the disclaimer.
Throws errors on detection failure, such as with short samples, providing immediate feedback to developers without silent failures.
Only detects BPM within 90-180, making it ineffective for music with slower or faster tempos, which restricts its use to specific genres.
Dependent entirely on the Web Audio API, so it cannot be used in Node.js or server-side environments, limiting deployment options.
Merely throws errors without providing fallback BPM estimates or confidence scores, requiring additional code for robust error management.
The README is brief and lacks comprehensive examples for handling various audio sources, troubleshooting, or edge cases beyond the basic usage.