Trigger action automatically every time an incoming OSC message is detected

Hi everyone,

I want to trigger an action (play a buffer) when a receiving OSC message has been sent… how can we detect that an osc has arrived and how can we activate automatically the next action?

many thanks

The starting point is here: OSCdef | SuperCollider 3.12.2 Help

Or its companion, OSCFunc, which behaves the same except that you’re responsible for storage (OSCdef maintains storage for you).