This article is intended to provide a practical introduction to the networking of software and hardware via the OSC network protocol.

Open Sound Control (OSC)

OSC is a network protocol which usually uses UDP as transport protocol. Sometimes OSC is called Midi successor, this statement may refer to the fact that various programs offer an OSC interface for operation, which previously happened almost exclusively via Midi.
However, Midi and OSC cannot really be compared, since the two protocols were created at different times and also have a different purpose. Therefore there is no comparison at this point which protocol is better or worse. As already mentioned, OSC is a network protocol, which means that it can connect programs on the same computer as well as external hardware and software.

Example: Reaper, grandMA3, TouchDesigner and Chataigne

Let’s say we want to implement an audio-visual show in which we use Reaper as DAW for all audio content, grandMA3 for lighting control and TouchDesigner for real-time visualizations on a projection screen.

First naive approach

Okay, so we start to implement our show and research how to get OSC signals out of our software and back in again.
So Reaper offers an OSC interface which can be configured via an “OSC pattern config file”. As we can see from the documentation we get some information from Reaper like the transport time, and triggers by markers and regions.

MA-Lighting also offers an extensive OSC interface in grandMA3. So we can change and trigger faders and buttons of executors in grandMA3. However, the executors do not return any information. So we don’t get any information about them when they are changed directly in the console/PC. As an alternative we can use List and CD to get into the internal structure of grandMA3 and change the sequence objects directly. In this case we also get an OSC output that signals us when the objects in grandMA3 have been changed. In addition, we can also change special objects like the SpeedMaster and GrandMaster this way. In addition, grandMA3 also understands commands (cmd), which allows you to change and control almost all parameters.

With TouchDesigner we should have no problems, after all we have the OSC In CHOP and OSC Out CHOP and the whole range of tools TouchDesigner spoils us with. On closer inspection, however, the whole matter becomes more complex because the OSC CHOPs do not understand strings. For that we have to use the OSC DATs and accordingly code at least a bit of Python.

Control flow

What does this mean for our workflow? We have to use TouchDesigner as central connection point in any case, because grandMA3 does not understand the OSC commands of Reaper. For more complex controls we definitely need strings as parameters in the OSC messages, because triggering sequences and executing commands in grandMA3 runs via strings. So mapping the messages and creating the control logic in TouchDesigner will be complex and will require writing Python code in any case.

Let’s assume we want to change parameters like GroupMaster in grandMA3, Feedback in TouchDesigern or a VST parameter in Reaper via a MidiController to experiment with different settings or to intervene in realtime during the show. In addition, someone comes up with the idea to play video content on additional monitors via Resolume, which of course should also be triggered to match the show and adjusted via parameters.

Of course, all this can be realized in TouchDesigner. But anyone who has ever faced such a task can confirm that the control logic becomes very complex and changes in the setup become a huge task that requires an understanding of software architecture. However, changes in setup are part of the creative process and should be celebrated, not feared.

Chataigne as control center

Chataigne (Github) is an impressive piece of open source software which should be known by everyone who understands the previous text. It can be compared to programs like QLab, Bome MIDI Translator Pro, OSCulator, VEZÉR or TouchOSC and combines the possibilities of all these programs in one free cross-platform tool.
If you want to learn more about Chataigne you should watch this two hours and 45 minutes video of Benjamin Kuperberg the creator of Chataigne.

So in our outlined setup, Chataigne takes center stage and handles translating and adapting the control signals for the respective software and hardware. For the Midi signals of the controller there is the Build-In module Protocol/Midi, for Resolume there is also a Build-In module Software/Resolume. For grandMA3 the community module Software/grandMA3 can be used. This facilitates the communication and saves you the familiarization with the object structure of grandMA3. The module can be installed via the integrated Community Modules Manager.
For TouchDesigner the integrated Protocol/OSCQuery module should be used. In combination with the OSC Query Server (.tox) for TouchDesigner you have an incredibly flexible and easy way to get many signals in and out of TouchDesigner.

The inclined reader may now ask: “Wait, don’t I still have the same complexity now and just one more program running on my already overtaxed computer”. The answer to this is: “sure…”, but you don’t have to take care of the software architecture yourself anymore and also a large part of the recurring tasks is made easier and simplified for you. Also, all the glue that holds your setup together is in a single central file.

Let’s assume you want to change the volume of a channel in Reaper and at the same time the brightness of a group of lamps in the room and the feedback of an animation in TouchDesigner via a fader on your midi controller. The MidiController sends a signal between 0 and 127, grandMA3 has a range between 0 and 100, Reaper between 0 and 1 and TouchDesigner between 0 and 4. Additionally you might want to have thresholds and alternative curves for the different programs. You want to be able to change these mappings easily in the creative process without getting stressed out every time you get the question, “Can we add this?”

Bringing the visual stuff closer to the sound

With the outlined setup we can already create impressive timecode or realtime shows. But with another tool we can go one step further. OSC-Par is a small VST plugin that sends the envelopes and the midi notes of your audio or midi track of your DAW via OSC.

Let’s assume we have a synthesizer on a track which is played via midi. OSC-Par sends the midi notes of the track via OSC and we can assign individual lamps to the midi notes in Chataigne and control the brightness of the respective lamp via the velocity. Additionally we might put an envelope on the track to change a parameter of the synthesizer. OSC-Par also sends the current values of the envelope via OSC to Chataigne and there we can use the value to change the color of our lamps for example. If it’s relevant for you, you’ll get a lot of ideas right now. In any case, through OSC-Par we can create an imersive experience for realtime setups, timecode shows and any combination thereof.