uptempo
v0.1.0
Published
BPM math, dependency-free: note durations in ms for any tempo, ms-to-BPM, and a tap-tempo calculator. From ambient to uptempo and beyond.
Maintainers
Readme
uptempo
BPM math, dependency-free. From ambient to uptempo and beyond.
import uptempo, { msToBpm, tapTempo } from "uptempo";
const t = uptempo(174); // drum & bass
t.quarter; // 344.8ms
t.sixteenth; // 86.2ms
t.triplet(t.eighth); // swing material
t.bar(); // one 4/4 bar in ms
msToBpm(500); // 120
const tap = tapTempo();
button.on("press", () => console.log(tap.tap())); // live BPM from tapsHandy for LED sync, animation timing, sequencers, or arguing about whether uptempo starts at 190 or 200 BPM (this library takes no position).
MIT © wobondar
