How can the generated waveform be saved ?
See original GitHub issueHello,
I didn’t find a consitant documentation for saving the generated waveform data.
I’ve tried
wavesurfer.on('ready', function () { // the width of the waveform in double pixels var width = wavesurfer.getDuration() * wavesurfer.params.minPxPerSec * wavesurfer.params.pixelRatio; var dataJSON = wavesurfer.backend.getPeaks(width); console.log (dataJSON); });
But its empty… What is the best method to do this exportPCM ? backend.getpeaks() ?
Best P.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How can I save a waveform I've created and ... - MathWorks
How can I save a waveform I've created and stored in a variable into a raw audio file .Can an example be given...
Read more >Saving waveform in vivado - Xilinx Support
1) open the project and run simulation · 2) Add desired signals to waveform. · 3)log_wave -r * · 4) restart ; run...
Read more >Save Waveform File - NI - National Instruments
Select the Save Waveform File menu and select Current Settings option to display the Save Waveform File dialog box as shown in the...
Read more >How do I save a waveform from ModelSim for later opening ...
You need to save the waveform/dataset as a .wlf file. To tell Modelsim to capture all signal values in the design you can...
Read more >How to Save your Waveform Setup in PSIM - YouTube
In this short tutorial video, we show how you can save your waveform setup in SimView. By saving a setup file, you can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@the1the you can use
var peaks = object.backend.getPeaks(960);
… where object is your wavesurfer object. 960 means 1920 long array so it is enoufg from small to widescreen if the waveform is meant to not be zoomed.Then, just wrap this in a AJAX request to generate your json file. You can add extra infos in it (I personally add audio length and audio URL).
` wavesurfer.on(‘ready’, function () { // the width of the waveform in double pixels //var width = wavesurfer.getDuration() * wavesurfer.params.minPxPerSec * wavesurfer.params.pixelRatio; var dataJSON = wavesurfer.backend.getPeaks(960); console.log (dataJSON);
Returns array[0]
so what I’m I doing wrong? Any help very appriciated.`