Juce different coloured waveform based on play position


I am trying to set the waveform to have a different colour before and after (my code below), but at the moment the waveform isn’t remaining static once its drawn.

Am I over complicating this?

Does anyone have any feedback?

I’m not sure if I understand correctly what you mean. Perhaps you need 2 instances of the Audiothumbnail?

I have cloned AudioThumbnail and added a bit of code. I now have what I called “MulticolorAudiothumbnail” which allows you to draw sections of the waveform in a different color.

I know it’s not ideal to copy an existing class as all changes made to the original would also need to be copied to your clone but I didn’t find a better way at the time and the solution works. My use case was to draw a waveform in a selected state eg with inverted colors.

Let me know if you want me to share it.

Yes, I would be very curious to see how you did it?