An OpenSound Control (OSC) interface to AMICO. It runs an OSC server, enabling other modules to update and delete variables, and in also enables definition of OSC adapters, that map variables from the communicator to messages sent to other OSC servers.
java -jar %AMICO_HOME%/bin/amico-opensound.jar [<conf-url>]
Message | Argument(s) | Description |
/update | OSC-string variableName, OSC-string variableValue |
Updates the variable. If the variable does not exist, it will be added. |
/delete | OSC-string variableName | Deletes the variable. If the variable does not exists, nothing happens. |
A main configuration file:
This is a minimal configuration file that uses default
parameters for missing attributes. --------------------------------------------- <?xml version="1.0"
encoding="UTF-8"?> |
This is a full configuration file that overrides default parameters. --------------------------------------------- <?xml version="1.0"
encoding="UTF-8"?> <command>UPDATE
last-loaded-module OSC</command>
|
A configuration file for OSC adapter variables (linked from a main
configuration file):
<?xml version="1.0"
encoding="UTF-8"?>
send an OSC message /clip/select to OSC server at localhost run on poirt 9999
with one parameter (value of variable lives-select-clip)
<parameter param-type="variable"
osc-type="int32"
value="lives-select-clip"/> |
This is simple Java program that call updateVariable method using Apache Java osc library.
import java.net.*;
import java.io.*; import java.nio.channels.*; import de.sciss.net.*; public static void main( String args[] ) throws Exception { OSCTransmitter trns = new OSCTransmitter(); InetSocketAddress
scsynthAddress = new InetSocketAddress( "127.0.0.1",
57110 ); trns.send( new OSCMessage( "/update", new Object[] { "age", "27" } ), scsynthAddress ); trns.send( new OSCMessage( "/delete", new Object[] { "age-range" } ), scsynthAddress ); } } |