Skip to content

BeatDetector (base on Web Audio API),Distinguish between the main rhythm and the chorus rhythm

License

Notifications You must be signed in to change notification settings

todaylg/BeatDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

BeatDetector (base on Web Audio API),Distinguish between the main rhythm and the chorus rhythm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published