wavesurfer.js icon indicating copy to clipboard operation
wavesurfer.js copied to clipboard

Spectrogram: Enhancement suggestion: Improve handling of stereo audio in Spectrogram plugin

Open lacvietanh opened this issue 9 months ago • 0 comments

Dear Wavesurfer Team,

I hope this message finds you well. I wanted to bring to your attention a potential improvement for the Spectrogram plugin in Wavesurfer.js.

Currently, when working with stereo audio files with both Left and Right channels, the behavior of the Spectrogram plugin can be suboptimal in certain scenarios. Specifically, when splitChannels is set to false, segments of audio that exclusively belong to the Right channel do not appear in the spectrogram. Conversely, when splitChannels is set to true, it results in a disproportionate allocation of space and misalignment of labels. image image

I believe there are a couple of potential solutions to address this issue. One approach could be to introduce a feature that enables symmetrical display of the Right channel, similar to how waveforms are displayed. Alternatively, implementing a mechanism to synthesize the signals from both channels into a single channel for spectrogram visualization could provide a more elegant solution. This could involve options such as mono or maxPeak aggregation.

Enhancing the handling of stereo audio in the Spectrogram plugin would greatly improve the user experience and the accuracy of audio visualization.

Thank you for considering this suggestion. I look forward to hearing your thoughts on this matter.

lacvietanh avatar May 23 '24 20:05 lacvietanh