Receive OSC message

kmll's icon

Hi, I am sending an OSC message to port 7400 from an external program, but I can't find a way to extract the value in MaxMasp. Any suggestions on a good way of doing this?

This is the message I am sending - "/track/value/60"

broc's icon

Max Patch
Copy patch and select New From Clipboard in Max.

Pedro Santos's icon

udpreceive 7400

kmll's icon

Thank you so much for the reply. I have got it working now based on your feedback. Just a quick follow up I hope you also can give me an advise. I have extended the message to be /track/value/60;23 where I want the 60 to be sent to [noteout] Pitch inlet, and 23 to [noteout] Velocity inlet. Can this parsing be done using regexp as well?

Source Audio's icon

Avoid using semicolon, it has special task in max message.
Why not /track/value/60 23 and unpack the 2 values ?

Max Patch
Copy patch and select New From Clipboard in Max.


LSka's icon

for easier management, you can install the CNMAT externals from the package manager and use their OSC-route object

Jan M's icon

a vanilla max version would be just just using [regexp (/) @substitute " "] to transform the OSC string into a list.

Max Patch
Copy patch and select New From Clipboard in Max.

broc's icon

Generally I'd recommend to use proper OSC syntax for the messages.
Then you can get the arguments with a simple [route] object.

Max Patch
Copy patch and select New From Clipboard in Max.