Just the Best Parts: Open Sound Control - Chapter 2.05

The finished, cleaned-up, copy-edited version of this book is available for purchase in PDF, mobi, and epub formats. You get all three formats when you buy the book. Plus, the paid version is where updates are made and contains content not available in the Web version.

Buy it now and get the most recent content. »

Bundled messages

OSC clients can also send message bundles. A bundle is collection of OSC messages all sent at the same time. When an OSC server gets a bundle it unpacks the messages and processes them as a whole. Bundles are handy for sending a set of related messages, especially where pattern matching may not be implemented.

As with pattern matching, not every application that offers OSC may have support for bundles. Some software may have one and not the other.

The OscP5 library for the Processing language, for example, will happily handle message bundles but does not support pattern matching.

Networks and stuff

Being “transport independent”, the OSC spec doesn’t require OSC messages be sent in any particular way. The details for any given situation will vary depending on how OSC is being used. For example, if you have a stage lighting system that uses OSC it is possible that it uses dedicated wiring and some custom means of sending messages. But many tools and software that use OSC take advantage of existing technology, especially computer networks.

Software such as Renoise send and receive OSC messages over a standard computer network. In these cases there are, for the client and the server, two things you need to know: The IP address, and the port number.

IP is short for Internet protocol. Yes, that Internet. The technology that lets you very Web pages and send E-mail is also what let’s you connect multiple computers in your home, or send stuff from your phone to a computer.

You can think of IP addresses as similar to phone numbers. They need to be unique, so that if someone gives you a number to call you get the right person.

But IP addresses are sort of like phone numbers for offices. When you call an office you are often asked for an extension. Similarly, to reach a computer on a network you need the IP address and you also need a port. You can think of a port as something like a telephone extension.

Often when you call an office you reach some default extension, and it’s much the same with computers. Various activities, such as Web browsing or E-mail operate on default ports.

There’s no default port for OSC systems, so when you are setting up an OSC client and server you’ll need to indicate IP addresses and the port numbers to use.

IP addresses often look like this: 75.125.194.82. Basically, four sets of numbers, separated by dots.

(Note: This is not entirely the whole complete story. However, for our purposes we can ignore a bunch of technical details.)

There are assorted rules and conventions with IP addresses, and one of them is the special address 127.0.0.1 always refers to local machine. What that means is, if you have some OSC software, ans you tell it to send messages to the computer at 127.0.0.1, then it will send them to same machine that is running that OSC software.

Think of it as a way for a computer to talk to itself.

Often you will be using different devices to exchange OSC messages, in which case you will need to know the IP address for interacting with the outside world.

If you are on Windows you can open up a command prompt and enter ipconfig.

If you are on a Mac, open up System Preferences, then click on Network. Click on ’Ethernet" in the left-hand side if it is not already selected. The IP address will be listed on the right-hand side.

Finding out the IP address of your smart phone is a little trickier; you’ll have to refer to your phone manual to see what to do. It’s likely under either a “Network” option or “System.”

One important thing to note, though, is that in most cases your phone will have to be using a local Wi-fi network in order to communicate with other local computers. Also, your phone will have to have Internet capabilities. That may seem obvious once stated, but make sure this is the case.

Port selection

Some program with built-in support for OSC are pre-configured to use one or another port. For example, Renoise is set to use port 8000.

TouchOSC, a mobile app for Android and iOS devices, also defaults to 8000 for sending OSC messages, and 9000 for receiving messages.

Unless you run into a problem these are perfectly usable values. There are times when some other application, unrelated to OSC, may decide to use port 8000.

If for whatever reason you are having trouble sending or receiving OSC messages using a particular port, try changing it.

There are some restrictions on what port numbers you can use. If you pick a port number somewhere from 8000 to 9999 you should be OK.

Next page

comments powered by Disqus

The finished, cleaned-up, copy-edited version of this book is available for purchase in PDF, mobi, and epub formats. You get all three formats when you buy the book.

The paid version is also more current and has additional content not available in the Web version.

Buy it now and get the most recent content. »