OSC Out Dat run function on message sent?

Hello,
I’m using an OSC out dat and I would like to implement a log of all the messages being sent. It seems like the OSC out dat node is itself a table that should hold that information, but I cannot figure out how to make it populate. I have also tried to use the callback DAT parameter but I was unsure of the syntax for a linked DAT and couldn’t get any lines to run. What is the best way to run a line of code when a message is sent? Should I just run it along side the sendOSC() call?

Thanks, Jake
OscCallbackTest.toe (4.77 KB)

Right, even though it is a table, the OSC Out DAT logs incoming messages.
You will need to log the messages you want stored in addition to sending them as OSC.

Cheers.

And you can write the line of code to write to your log just after you’ve called SendOSC in your code. Look into the FIFO DAT for writing your sent messages log to, it’s very handy to save the last 100 messages for example.

To expand on the above…

oscoutDAT is really an OSC in and out DAT. When oscoutDAT sends a message, the receiving computer receives a source with the message. That source is the oscoutDAT. So if the receiver replies to the message source, that reply will show up in the oscoutDAT table.

If you want to track the messages going out, you probably need to do it yourself in your own code. Best way would be to create a Python function that both logs your message and calls the oscoutDAT.sendOSC function. Then, whenever you want to send a message, call your function instead of sendOSC. You can either put your function in a raw textDAT as a module, or make an extension.

Ahh, I wasn’t receiving any messages so I wouldn’t have seen that. Thanks Everybody.

@nettoyeur wow FIFO looks great for this, thanks for the tip