tempo-detector

1.0.1 • Public • Published

Very simple utility function to detect the beats per minutes based on the time between function calls.

A very simple example of a tap for tempo would be:

 <div id="display"></div>
 <button id="button">Tap For Tempo</button>
 const button = document.getElementById('button');
 const display = document.getElementById('display');
 
 const beatDetector = tempoDetector(bpm => {
   // this will continue to be called
   display.innerText = bpm;
 });
 
 button.addEventListener('click', beatDetector);

Readme

Keywords

none

Package Sidebar

Install

npm i tempo-detector

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • farinajoey