OSC and Pure Data

Pure Data (Pd) is a data flow programming language, which means that functions (objects) are linked (patched) in a graphical environment. This models the flow of controls and audio.
For example, for a project I use the Motive software from OptiTrack on the computer in the experimental studio and as soon as I open the BatBat application and connect the network cable to my MacBook, I can receive the data in real time so that I can use it on my PureData patch that runs on mine Laptop.

The client application that I use, BatBat, is being made for the communication with a OSX system and I would say It’s pretty funny, because the first time NEVER work, so you have to close it and restart. It’s like that every single session!

After the correct connections have been made, the objects must be added in Pd that can receive this data and make it usable.

The first object in the chain is “netreceive”, which enables the reception of a data stream coming from a specific port, specifying the desired data type, in this case UDP (“datagram”) and the desired encoding type, in this case binary numbers.

The other objects in the chain are used to take the numeric list and interpret them as bytes, producing an output with Pd messages and then set up the route to use the OSC data with certain messages. In other words, to use the data from exactly the desired source.

The last step that is necessary in order to use this data is to unzip this data. The letter “f” post as an argument of the object indicates the production of a FloatNumber as output. There are 3 in which they correspond to the data on the X, Y and Z axes.

Now we are ready to use those data to control our parameters in Pd.