Any way to know when jit.net.send is done sending a static matrix?

Jul 10, 2013 at 8:02am

Any way to know when jit.net.send is done sending a static matrix?

Hi,

Can’t find any doc info about jit.net.send reporting when it has finished sending a matrix (static images in my case). I’m looking to load a series of images from disk and transmit them via jit.net.recv… and I seem to be crashing using uzi or clocked counter to do it… so I’m looking to trigger the next load/transmit after sensing that the previous transmission is complete.

The bigger picture goal here: I want to load new source photos from disk without interrupting jit.gl animation clocked by CPU. My hope is that I can load the images in a second Max runtime and send them to the main runtime via jit.net.send/recv without interrupting the clocked animation. Any other solutions are very much welcome!

Thanks!

Jeff

#255553
Jul 10, 2013 at 9:50am

idk if jit.net.send says when it is finished, but in the meanwhile you could send a “done” message from the client (jit.net.recv), once it has received the matrix. It would require sending also smthg like identifiers, or counting how much “done” messages are received.

#255565
Jul 10, 2013 at 10:22am

Thanks, vichug. Thought of that… but I’m not finding a way to have jit.net.recv send any kind of done status either. For that matter, I’m not seeing how to get the jit.matrix that follows it on the receiving end to deliver a done status either. (jit.matrix bangs outlet 2 when finishing an importmovie, but apparently not after receiving from jit.net.recv.

#255571
Jul 10, 2013 at 10:40am

you could use an extra object (f.e. maxhole) for sending the message back:

<code>

– Pasted Max Patch, click to expand. –

</code>

#255572
Jul 11, 2013 at 8:44pm

Thanks, tobiasros! That seems to have given me a solution. ;)

#255730

You must be logged in to reply to this topic.