Split Waveform

Hello, I am new to Juce and fairly new to C++,

Just after general guidance at the moment.

Is it possible (without too much difficulty) to do a split waveform? I have a bog standard waveform working, but I would quite like to be able to stack two waveforms on top of each other. With the top portion from track A and the bottom portion from track B.

Is this this possible? And if so broadly speaking how would you go about it?

Thank you!

If you are using Juce’s AudioThumbnail, I would see 2 obvious possibilities : either draw 2 AudioThumbNails into a single custom component or draw 2 AudioThumbNails into 2 separate custom component instances. The approach with 2 separate components might be easier in terms of handling mouse events and such.

With drawing two separate waveforms, is it possible to isolate the top and bottom halves of the waveforms respectively?

Or would you need to show two complete waveforms?

I think I can do this by setting the area in drawChannel to be half outside of my component box, but that feels like an inappropriate workaround?