beatdetector

v1.0.2
[![npm](https://img.shields.io/npm/v/beatdetector.svg?style=flat-square)](https://www.npmjs.com/package/beatdetector)[![npm](https://img.shields.io/npm/l/beatdetector.svg?style=flat-square)](https://github.com/todaylg/BeatDetector/blob/master/LICENSE)

BeatDetector.js

npmnpm

Usage


 <audio id="audioEle" src="./test.mp3"></audio>
 <script src="../BeatDetector.js"></script>
 <script>
    let audioEle = document.getElementById("audioEle");

    new BeatDetector(audioEle, analysisFin, onBeat, onBigBeat);

    function analysisFin(){
        audioEle.play();
    }

    function onBeat(){
        console.log("Emit Beat");
    }

    function onBigBeat(){
        console.log("Wow!! Emit BigBeat");
    }
 </script>

you can see this method's use on WebVR-Audio-Visualizer's PreAnalysis and RealTimeDetect

npm i beatdetector

Metadata

  • MIT
  • Whatever
  • todaylgß
  • released 8/18/2018

Downloads

Maintainers