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

change color of wave by start and end time

Open zahraHaghi opened this issue 4 years ago • 4 comments

I want to use wavesurfer .and I have ywo issues

  1. show selected part with region in another wave.
  2. change color of part of wave by start and end time.for example from 2 to 6 seconds color could be blue from 7 to 10 seconds could be red

how can I do these?

zahraHaghi avatar Feb 02 '21 08:02 zahraHaghi

@thijstriemstra is there a way?

zahraHaghi avatar Feb 05 '21 08:02 zahraHaghi

I want to know how to set different color for wave segment, for example from 2 to 6 seconds color could be blue from 7 to 10 seconds could be red

liankuai avatar May 11 '21 07:05 liankuai

@thijstriemstra is there a way?

Hi, Do to know how to set different color for wave segment, for example from 2 to 6 seconds color could be blue from 7 to 10 seconds could be red?

liankuai avatar May 11 '21 07:05 liankuai

Hi, did you find any solution on how to color waveplot this way?

harshitkaran avatar Aug 23 '22 17:08 harshitkaran

Hi, did you find any solution on how to color waveplot this way?

Did you find a solution to this?

Fahad-Anwar3 avatar Nov 16 '23 12:11 Fahad-Anwar3

@Fahad-Anwar3 No solution to this yet except for an acknowledgement that this is currently not possible. I raised the question in QnA and got a reply from the developer. https://github.com/katspaugh/wavesurfer.js/discussions/3187

shallsaur avatar Dec 07 '23 02:12 shallsaur

Hello, if someone is still searching a way to achieve this sort of effect, I used a little trick to make it work quite properly.

I create three regions : left, middle and right.

Both left and right region are no draggable or resizable. I set to them a color low opacity but darker than the middle region and on event "updated" of the middle region, I update the options start/end of the left and right region to stick with the middle one that is currently moving.

I know, it's tricky but in my case it works fine enough to make the illusion that I only have one region in highlight.

gdamou avatar Jun 16 '24 02:06 gdamou