How to use webaudio-peaks - 2 common examples

To help you get started, we’ve selected a few webaudio-peaks examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github naomiaro / waveform-playlist / src / Track.js View on Github external
calculatePeaks(samplesPerPixel, sampleRate) {
    const cueIn = secondsToSamples(this.cueIn, sampleRate);
    const cueOut = secondsToSamples(this.cueOut, sampleRate);

    this.setPeaks(extractPeaks(this.buffer, samplesPerPixel, this.peakData.mono, cueIn, cueOut));
  }
github naomiaro / waveform-playlist / src / track / recorderWorker.js View on Github external
onmessage = function(e) {
    let peaks = extractPeaks(e.data.samples, e.data.samplesPerPixel);

    postMessage(peaks);
}

webaudio-peaks

Small library to extract peaks from an array of audio samples or an AudioBuffer from the WebAudio API.

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Popular webaudio-peaks functions