Introduction
So you want to do a workflow from IANNIX to Max MSP aren't sure how to receive, unpack and use the IANNIX OSC data in Max? We've got you covered.
Preparing IANNIX
IANNIX makes it crazy easy to send nice OSC-Data. For this tutorial I created a simple Rosette (Files Tab -- Examples -- Rosette -- Quantity 5) You can use something else, I don't care. For the sake of this tutorial just be sure it has cursors and triggers.
IANNIX automatically sends OSC-Data locally through port 57120, but better check back with this (Config Tab -- Network -- Enable OSC)
Press Play and boom, stuff is being sent. Well done so far!
Receiving data in Max
For receiving data Max you'll want to use the udpreceive function and the host you want to listen to. In our case this comes to
You may want to check if you got everything communicating by using a print command and checking the console, where lots of words and numbers should appear by now (if IANNIX is still playing of course). If nothing appears, check your Hosts or IP-Adresses. If you work on different computers, the udpreceive also needs the sender's IP-Adress, so you should write something like: udpreceive [IP-Adress]:[Host]
Working with data in Max
So let's look at the data received and check out what it means. Back in IANNIX you can hover over any cursor or trigger to see how it's OSC-String is build:
So this is what Max is receiving. We've just looked at a trigger, so let's say we want to continue working with data from the triggers exclusively. We can do that with a command in Max: route /trigger This only lets OSC-messages from the triggers through the grid. To make sense of the string and use only the data we want, we'll use the unpack command, which unpacks (duh) the OSC string, followed by the string's logical structure. In our case this leaves us with unpack 0 0. 0. 0. 0. 0. 0. Now we can do with any of the unpacked information whatever we like (I suggest you do some nice art with it), for this tutorial we'll be fine with just printing them to the console piece by piece, and you're done! Nice work! (Tutorial by Leif Weitzel)