This one is a bit complicated, I can just about picture what I want in my head; I will do my best to describe it here. Please don't get scared off by the long post! I've put detail as I need this to work for a project I'm working on for my degree. All help appreciated
I have a stream of values (floats) coming from an external source (via OSC). I want to be able to tell when this stream is interrupted, eg no more floats are arriving, so that I can switch off shape rendering in Gem.
A little about the patch:
Wii Remote detecting IR LEDs.
IR data captured with OSCulator.
OSC data sent to PD over localhost.
OSC streams routed to x and y values of IR points.
x and y values draw small circles in gem, showing position of IR points in real time.
Now, the problem is, if the IR beam is interrupted (no more OSC data coming in), the circle shapes stay on screen and don't move. When the beam is restored, the circles ping over to their new position. I want there to be NO circles if the beam is interrupted (no data flow).
I want to be able to say (in pseudo code)
If data stream
render circle on
send data stream to [translateXYZ]
else
send stop rendering to [circle]
end if
I have read all the PD help patches and can't find anything that would really do the trick. I have a suspicion there might be something to do with checking if a value existed over time? Or maybe 'bang' something to 'remind' it theres no more data.
Any help appreciated.
I would attach the patch, but since its so hardware dependent, there wouldn't be much point. I hope I have described it as best above.