1.0.2 • Published 6 years ago

beatdetector v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

BeatDetector.js

npmnpm

 <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

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago