I am not quite sure if this is the right state exchange site or not. Pls let me know.
So, I noticed that Logic and Pro Tools, etc. have this waveform shrinking and expanding effect when dragging the region through tempo changes.
Here's a short video: https://imgur.com/a/ol8JB6J
I was wondering how one would achieve that? Given that you have a point cloud representing your peaks and a window size in which the waveform should be rendered, how could one shrink and expand the waveform in real time? Because the window size obviously changes depending on the tempi given during the window. I guess you'd have to know the viewport pixelToSampleRateFrame ratio for every vertical pixel line, but still. It seems super expensive to redraw it with every movement the user does. I can't really wrap my head around how that would work in a efficient way and I thought that maybe someone here has an idea.