Using the liblo

The OSC protocol is a wide spread means for communication between software components or systems, not only suited for music applications. Read more in the OSC chapter of the Computer Music Basics. There is a large variety of OSC libraries available in C/C++. The examples in this class are based on the liblo, a lightweight OSC implementation for POSIX systems.

Installing the Library

On Ubuntu systems, as the ones used in this class, the liblo library is installed with the following command:

$ sudo apt-get install liblo-dev

Including the Library

The liblo comes with additional C++11 wrappers to offer an object-oriented workflow. This feature is also used in the examples of this class. The following lines include both headers:

# include# include...

The OSC Manager Class

The OSC-ready examples in these tutorials rely on a basic class for processing

// create new server
st = new lo :: ServerThread ( p );

// / Add the example handler to the server !
st - > add_method ( NULL , NULL , double_callback , this );
st - > start ();

Contents © Henrik von Coler 2021 - Contact