hold up graphical output to eradicate OSC latency

hey,

i am using OF to send OSC messages to supercollider. but a am having a little latency from the time i send the message until i can hear the SC output.
i interconnect graphical events with sc sound via this way.
to correct this latency i am asking me if there is a way to hold up the graphical output of OF to correct the subjective impression for the viewer. i hope you understand what i mean, maybe some of you had a similar problem or an idea how to realise
a better accordance between sound and graphic. is there a way to holdup the output a few milliseconds inside the OF core?

no, there isn’t currently any way to do that.

you’ll probably have to put the events into a queue with an attached counter, and count down the milliseconds until you fire the actual event. send the event to supercollider immediately and put another copy of it in the queue for a few milliseconds later.

while there is no core way to do this, and I think damians approach is a really good idea, one alternative solution I could think of would be to render to a ring buffer of FBOs your graphics, and then display the oldest one. That way, you could delay the drawing by a second if you are 30 fps and you have 30 offscreen buffers to draw to and cycle through.

hope that helps!

  • z

my graphical action is outsourced to classes so i can call the output method when i want.
damians way would fit verry well. thanks a lot.