Skip to content
Michael Scott Levy edited this page Apr 19, 2019 · 3 revisions

The location of a track's duration.

sound.sourceNode.buffer.duration

How to create an analyzer node for visualizations

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);