-
Notifications
You must be signed in to change notification settings - Fork 132
Home
Michael Scott Levy edited this page Apr 19, 2019
·
3 revisions
sound.sourceNode.buffer.duration
const context = Pizzicato.context;
let analyser = context.createAnalyser();
sound.connect(analyser);
setInterval(function () {
let bufferLength = analyser.frequencyBinCount;
let frequencyData = new Uint8Array(bufferLength );
analyser.getByteFrequencyData(frequencyData);
//frequency data returns an array of values
let volume=frequencyData[0];
}, 50);