I have a patch which uses waveform~ to play a part of a buffer~. I am doing the usual windowing of the buffer~'s output by multiplying groove~'s output by an envelope using the right output of groove~ to play a window by wave~. This provides me with click free playback at the edges of my selection in waveform~.
However, if I move the selection left or right to such an extent where the selected area moves past the playhead, I get a click as the playhead relocates to inside the selection. I think I need to make the windowing start again when this happens, as it doesn't seem to be doing this.. I'm a bit stuck though, I'm sure there must be an easy way to do this! Could someone please suggest the best way to remove these clicks? Here's the part of my patch that handles the buffer and windowing if its relevant..