Published
Edited
Aug 8, 2019
1 fork
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
analyzer = initialize(fileDataUri);
Insert cell
function initialize() {
if (!fileDataUri) {
return null;
}
const audioContext = new AudioContext()
const htmlAudioElement = document.getElementById("audio");
const source = audioContext.createMediaElementSource(htmlAudioElement);

source.connect(audioContext.destination);

const levelRangeElement = slider;
const analyzer = meyda.createMeydaAnalyzer({
"audioContext": audioContext,
"source": source,
"bufferSize": 512,
"featureExtractors": ["rms"],
"callback": features => {
levelRangeElement.value = features.rms;
}
});
analyzer.start();
return analyzer;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more