Draw a moving playhead over a waveform
I've drawn a waveform in a gl window using a patch I found here on the forums.
The waveform represents a buffer which I am playing using groove~
What I would like to do is draw a moving playhead over this waveform.
Here's my first attempt but noob alert - it ain't pretty!
Can anyone point me in the right direction for a cheap solution?
cant see the patch at the moment, but did you try the line $1 message?
I would take the sync output of groove~ into snapshot, multiply it by the 'total time' output of info~ and then into a 'line $1' message ->waveform~
Hmm waveform~ draws to the patcher window. You can't display it in a GL context can you?
My patch is basically what you describe but using linesegment and ji.gl.sketch.
But the results are rubbish!
ah i see. i missed the gl part. :
Next attempt. Getting closer now but I could still use some help!
It uses the patch from the following thread.Thanks Graham
https://cycling74.com/forums/jit-gl-graph-for-a-waveform-display
closer, a few changes, but still the main issue remains :/
Think I must have been losing the plot when I posted this.
Drawing a playhead marker is alot simpler than this - just using jit.gl.sketch and a variable position does the trick.