wavesurfer-export-audio-plugin
v1.0.4
Published
WaveSurfer.js export audio plugin.
Downloads
4
Readme
WaveSurfer Export Audio Plugin
WaveSurfer.js Export Audio Plugin
NOTE This plugin works for WebAudio backend only for now.
Usage
import ExportAudioPlugin from "wavesurfer-export-audio-plugin";
const wavesurfer = WaveSurfer.create({
container: document.getElementById("wavesurfer"),
backend: "WebAudio", // Just WebAudio for now..
...
plugins: [
...
ExportAudioPlugin.create(),
...
],
});
document.getElementById('some-button').onclick = async () => {
const lowpass = wavesurfer.backend.ac.createBiquadFilter({ type: 'lowpass' })
wavesurfer.backend.setFilter(lowpass)
const renderedBuffer = await wavesurfer.getRenderedAudioBuffer(); // Lowpass filter applied AudioBuffer
wavesurfer.backend.disconnectFilters()
}
Installation
$ npm i wavesurfer-export-audio-plugin
Methods
getRenderedAudioBuffer
- Returns filters applied audio buffer. // Eq: Lowpass, Highpass
Todos
- Support for MediaElement backend.
- Tests
License
MIT
Free Software, Hell Yeah!