Javadoc link

Open Sound Control (OSC) is a protocol for networking sound synthesizers, computers, and other multimedia devices for purposes such as musical performance or show control. OSC's advantages include interoperability, accuracy, flexibility and enhanced organization and documentation.

Osc service wraps the JavaOsc which provides connectivity to other OSC devices.
 

Here are its features from wikipedia:

  • Open-ended, dynamic, URI-style symbolic naming scheme (uniform resource identifier)
  • Symbolic and high-resolution numeric data
  • Pattern matching language to specify multiple recipients of a single message
  • High resolution time tags
  • "Bundles" of messages whose effects must occur simultaneously

For example this guys are implementing/using OSC to send/process data :

OSC controller

touchOSC

Processing

There is a more exhaustive list of wikipedia :
https://en.wikipedia.org/wiki/Open_Sound_Control#Applications

For more information here is pdf giving some of the OSC specificity in regard with MIDI
http://opensoundcontrol.org/files/OSC-Demo.pdf

Implementation with javaOSC

In order to implement OSC in myrobotlab and join the osc family the library called javaOSC could be used

It has a gui :

It is easy to use, choose:

  • The port for communication.
  • The ip to send to.
  • The adress of the message you want to send or receive (using the form /address/channel)
  • Set a value (supporting integer, Double Precision Floating Point, Strings, and more)
  • Send

For the server part i don't know how it is supported in this case.

But a gui supporting the server port could be neat with these functions:

  • set the number of servers
  • set the port to listen to for each server
  • filter the messages by addresses (using the form: /address/channel)
  • the possibility to trigger service/function on the reception of the messages

References:

 

Example code (from branch develop):
#file : Osc.py (github)
# start the service
osc = runtime.start("osc","Osc")
 
# connect - which is not 'really' connecting - but
# specifying the host/port of where we'll be sending 
# the messages to
osc.connect("localhost", 12000)
 
# now start sending messages 
# the format is
# sendMsg(topic, arg1, arg2, arg3, ...)
osc.sendMsg("/test", "this is a string", 3, 7.5, "another string")
osc.sendMsg("/newTopic", 18, "hello", 4.5)
osc.sendMsg("/somewhere", "this", "is", 7, 3.3, "variable arguments")
 
# to listen we choose a port - and an address filter
osc.listen("/*", 6000) # this should be everything ..
# we could just listen to a single topic like this
# osc.listen("/test", 6000)
 
# we want them sent to python so we subscribe to
# the publishOSCMessage method
python.subscribe("osc", "publishOscMessage")
 
# the messages will come back to us in onOscMessage
def onOscMessage(message):
  print(message)
  data = message.getArguments()
  for d in data:
    print("data - ", d)
Example configuration (from branch develop):
#file : Osc.py (github)
!!org.myrobotlab.service.config.ServiceConfig
listeners: null
peers: null
type: Osc