beatdetector
v1.0.2BeatDetector.js
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