Skip to content
BeatDetector (base on Web Audio API),Distinguish between the main rhythm and the chorus rhythm
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
dist
.gitignore
BeatDetector.js
LICENSE
README.md

README.md

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

You can’t perform that action at this time.