advantages over MIDI
- based on a TCP/IP network connection, which means you can talk on a local network as well as on the Internet, and easily add wireless devices to your network (you dont have to daisy-chain devices)
- it's polymorphic : data can be integers , floating numbers, text, timetags, blobs
- high resolution: 32-bit instead of 4-bit (in other words: values may range far more than from zero to 127!)
- you may send text (in ASCII mode only though)
- every message has a timetag, which helps for synchronization
see also the official specifications
TCP/IP
TCP/IP is an set of protocols which allow different machines to communicate over a network. Machines are given numerical adresses called IPs. TCP is a connection-centric protocol which checks for errors, whereas UDP, which is faster, is not connection-centric and is more prone to errors. UDP has been designed with speed rather than quality in mind and is used for OSC connections.
how to setup a connection
we've got to know the name or numeric adress of the remote host we'd like to talk with. For instance, gangplank_laptop or 192.168.1.76
then we need to know the port number on which the remote host is listening. For instance, it defaults to 1234 with Isadora.
we now have enough information to open a connection to host 192.168.1.76 on port 1234.
- on the local host side, we have to listen to a given port. We can pick any arbitrary integer value between 1025 and 65536. Beware not to pick a port which is already in use by another program.
how to write a message
Let's say we want to send the temperature both in Celsius and Fahrenheit degrees. We'll have to build the message path before sending the actual value. It is mandatory to begin with a slash ( / ) and separate the path from the value by a space. It should read like this:
/temperature/celsius 37
/temperature/fahrenheit 99
The path-formatting syntax is extremely flexible. Let's pretend that we need to send to both Isadora and Pd the XY position of the mouse of our localhost. To Isadora, listening on port 1234, I'll format my message as such:
/isadora/1 370
/isadora/2 345
But Pd is much more flexible. It may listen to several ports at a time, and accept any valid path. For instance, it may listen to incoming messages on both port 1233 and 1232. And it may accept messages as short as
/mouseX 370
or more complex paths such as:
/vertical/position/of/the/mouse 345
