Answers for "wavesurfer pan"

0

wavesurfer pan

var wavesurfer = WaveSurfer.create({
            container: document.querySelector('#wave'),
            backend: 'MediaElementWebAudio'
        });
        // You have to use the same methods of MediaElement backend to load the audio file, passing peaks
        wavesurfer.load('big_audio.mp3', normalizedPeaks, 11625);

        // Example for StereoPanner node
        wavesurfer.panner = wavesurfer.backend.ac.createStereoPanner();
        let sliderPanner = document.querySelector('[data-action="pan"]');
        sliderPanner.addEventListener('input', () => {
            wavesurfer.panner.pan.value = Number(sliderPanner.value);
        });
        wavesurfer.backend.setFilter(wavesurfer.panner)
Posted by: Guest on July-15-2020

Browse Popular Code Answers by Language