How to save the compressed audio file from Tone.Compressor object to plot the compressed waveform using wavesurfer.js in Javascript? Ask Question

I would like to Plot the compressed signal like the below figure. If this is not possible, then is there any way to implement the signal plot in Tone.js? I have implemented visualizer using Tone.Analyser Node. I am also looking for Signal plot which is different from visualizer and looks like the below image.
The reason I want to declare the audio in Tone and then compress and then plot it in wavesurfer is that there is no signal plot implementation in Tone.js. Kindly let me know. It would be great if some one can help.

    var comp = new Tone.Compressor({
    ratio  : 12 ,
    threshold  : -60,
    release  : 0.25 ,
    attack  : 0.001 ,
    knee  : 30}).fan(waveform).toMaster();

I am new to Web audio API and i used a Tone.Compressor library to compress a audio and draw a waveform of the same. But i would also like to plot the compressed audio signal like the wavesurfer.js library does. I have attached the example below. Can some one please help me out to connect this two libraries and draw a waveform with the wavesurfer.js using the Tone.Compressor compressed audio.?
Signal Plot using waversurfer.js

Thanks in advance!!!!

Leave a Reply

Your email address will not be published. Required fields are marked *