RepositoryTypeScriptCHSwitzerland
dlepaux

dlepaux/realtime-bpm-analyzer

Tempo (BPM) detection for the browser with the Web Audio API: files, streams, the microphone or any audio node, live as the audio plays. Also runs in Node, Bun and Deno, from a CLI and an MCP server, and in Python and Java. TypeScript, zero dependencies.

338stars
23forks
2issues
3views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: analyzer

#1 Repository of the week

1
TINIX TRENDING·Topic: audionode

#1 Repository of the week

1
TINIX TRENDING·Topic: audiocontext

#1 Repository of the week

Realtime BPM Analyzer

npm npm install size CI Actions Status codecov

Realtime BPM Analyzer

A powerful TypeScript library for detecting beats-per-minute (BPM) in real-time.

📚 Documentation • 🎯 Examples • 🚀 Getting Started


Features

  • Zero dependencies - Uses native Web Audio API
  • Real-time analysis - Analyze audio/video as it plays
  • Multiple sources - Works with files, streams, microphone, or any audio/video node
  • Typed events - Full TypeScript support with autocomplete
  • Client-side only - 100% privacy-focused, no data collection
  • Supports MP3, FLAC, WAV formats

Installation

npm install realtime-bpm-analyzer

Quick Example

import { createRealtimeBpmAnalyzer } from 'realtime-bpm-analyzer';

// Create analyzer
const analyzer = await createRealtimeBpmAnalyzer(audioContext);

// Connect your audio source
audioSource.connect(analyzer.node);

// Listen for BPM detection
analyzer.on('bpm', (data) => {
  console.log('BPM detected:', data.bpm[0].tempo);
});

Documentation

📖 Full Documentation - Complete guides, API reference, and tutorials

Key sections:

Use Cases

  • Audio Players - Display BPM while playing tracks
  • Live Streams - Continuous BPM detection from radio/streaming
  • File Analysis - Offline BPM detection from uploaded files
  • Microphone Input - Real-time analysis from live audio
  • DJ Applications - Beat matching and tempo detection

Running Examples Locally

# Install dependencies
npm install

# Run a specific example
npm run dev --workspace=examples/01-vanilla-basic

# Available examples:
# - 01-vanilla-basic, 02-vanilla-streaming, 03-vanilla-microphone
# - 04-react-basic, 05-react-streaming, 06-react-microphone  
# - 07-vue-basic, 08-vue-streaming, 09-vue-microphone

Privacy & Security

  • 100% client-side processing
  • No data collection or transmission
  • No audio recording - real-time analysis only
  • Open source - fully auditable code

See privacy.md and security.md for details.

Contributing

Contributions are welcome! See contributing.md for guidelines.

License

Apache-2.0 License - See licence.md for details.

For commercial licensing inquiries, contact: d.lepaux@gmail.com

Sponsors

If your product depends on this library, consider sponsoring its maintenance via GitHub Sponsors.

Credits

Inspired by Tornqvist's bpm-detective and Joe Sullivan's algorithm.

Similar Projects

Discover other similar projects and AI models.

RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryTypeScript
freeCodeCamp/freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

459.9k
Dec 2, 2026
RepositoryTypeScript
vuejs/vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

212.6k
Oct 10, 2024
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

290.9k
Nov 30, 2026
RepositoryJavaScript
react/react

The library for web and native user interfaces.

253.0k
Nov 30, 2026
RepositoryJavaScript
trekhleb/javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

196.8k
Jul 26, 2026
Repository
getify/You-Dont-Know-JS

A book series (2 published editions) on the JS language.

184.8k
Oct 31, 2026
RepositoryTypeScript
ZaneH/metronome

🥁 A cross-platform metronome. Includes a tempo tapper, themes, and more!

132
Mar 6, 2025
RepositoryC#
KristofferStrube/Blazor.WebAudio

A Blazor wrapper for the Web Audio browser API.

186
Jan 27, 2026