Introduction to Version 2
O2 is a communication protocol and implementation for music systems
that aims to replace Open Sound Control (OSC). Many computer musicians
routinely deal with problems of interconnection in local area
networks, unreliable message delivery, and clock synchronization. O2
solves these problems, offering named services, automatic network
address discovery, clock synchronization, and a reliable message
delivery option, as well as interoperability with existing OSC
libraries and applications. Aside from these new features, O2 owes
much of its design to OSC and is mostly compatible with and similar to
OSC. O2 addresses the problems of inter-process communication.
Version 2 is a major rewrite featuring:
- asynchronous network and file I/O,
- Internet communication using MQTT, creating globally accessible
named services,
- the lightweight O2lite protocol for O2 clients, supporting HTML5
(web apps), microcontrollers, and high-speed shared memory
communication,
- publish/subscribe capability using the O2 tap mechanism,
- services have properties in the form of attribute/value pairs,
allowing processes to search for all services satisfying some
condition. Property updates offer another form of broadcast.
Build and Installation
O2 uses CMake. For Windows and Mac, use CMake to build a solution or
project for Visual Studio or Xcode, then build the ALL_BUILD project.
For Linux, use "ccmake ." to create a Makefile, then run make.
Currently, there is no installer -- you should explicitly link to
libo2_static.a. Note that we only build a static library using the
current CMakeLists.txt configuration file.
O2 is not compatible with recent changes in C compilers enabled by
the _FORTIFY_SOURCE
macro. Therefore, we pass the command
line flag -D_FORTIFY_SOURCE=0
to the compiler, and you
may see some associated warnings. (We're currently investigating how
to best to get otherwise correct code to compile without disabling the
FORTIFY option or generate warnings.)
Helpful Hints
If O2 is not making connections or discovering services:
-
Make sure you have a network connection. See if you can browse to some
Internet site on each machine that is not connecting via O2.
-
Check for firewalls. If you have a firewall, it must allow O2's
discovery ports and other ports that O2 creates, so you pretty much
have to enable all ports, at least while you are using O2. Try turning
off your firewall completely, at least to see if that fixes your
problems.
-
If you have a VPN connection, then O2 discovery messages will be
tunneled to some remote network. That might be what you want, but if
you are trying to connect to a local machine via O2 while you are
VPN'ed to some remote site (perhaps to read email securely?), then
close the VPN connection and try again.