Using OSC in DAT with callback script

Hi

I have been successfull in using the OSC in Dat node to get OSC data, but I would like to expand the function of the node by dynamically setting the maximum lines (rsp. a more elegant way)

my stream of osc data looks something like this:

and at the moment the node only outputs a table once it has reached a set size (Maximum Lines).

I would like to ouput the table once it reaches a /frame/end message.

so far I was able to use the callback script to clear the table each time it reaches the /frame/end message, but this is (obviously) not working.

def onReceiveOSC(dat, rowIndex, message, bytes, timeStamp, address, args, peer): if message.startswith('/frame/end'): op("oscin1").par.clear.pulse() return

now I wonder if there is a command I can send to the OSCIn node to force it to send the table…

cheers

martin

A better strategy might be to take every message coming in, write it to a staging table (not connected to the output of the OSC In DAT), then when you get the frame/end, write that final line, then do a op().copy() of the whole staging table into an “output” table. That way your output table only updates in the manner you’re mentioning when it updates once per frame/end.