OSC Address Space + Dynamic Interface Creation

By default, Control responds to OSC messages by setting the value of widgets that output to the same address as the incoming message. For example, if a slider outputs to /slider1, a message sent to Control at address /slider1 would set the value of the widget. You can also define custom behaviors for responding to OSC messages; this is outlined on the scripting page.

In addition to setting the values of widgets and defining custom delegates to handle OSC Control also supports a number of methods via OSC that can be used to configure interfaces dynamically and execute arbitrary javascripts. Most being with the address prefix /control. They are listed below along with the typetags / arguments Control expects to receive for each message:

  • /control/createBlankInterface ss nameOfInterface portraitOrLandscape – This creates and loads a blank interface. Although the name is not currently used, in the future it will be used to save dynamically created interface files. portraitOrLandscape determines the orientation of the interface. Example usage: /control/createBlankInterface "myInterface" "portrait"
  • pushDestination s ipAddressAndPort – This allows you to set the ip address and port that Control will output messages to. The one argument is a string with the address and colon separated by a colon. Example usage: /control/pushDestination ""
  • /control/addWidget s widgetJSON – You can add a widget to an interface by sending JSON defining the necessary values. Make sure that quotes are balanced. Example usage: /control/addWidget "{'name':'test1', 'type':'Slider', 'bounds':[.0,.0,.75,.3], }"
  • /control/setColors ssss widgetName backgroundColor foregroundColor strokeColor – Set the colors of a widget. Example usage: /control/setColors "test1" "#f00" "#ff0" "#fff
  • /control/setBounds sffff widgetName xPosition yPosition width height – Set position and size of a widget. Example usage:
    /control/setBounds "test1" 0 0 .2 .3
  • /control/runScript s javascriptToRun – This allows you to send over any arbitrary javascript to be run via an eval() call. Example usage: /control/runScript "test1.setValue(.3)"
  • /control/setRange sff widgetName newMin newMax – Set the range of a widget. Example usage:/control/setRange "test1" 0 .5
  • /control/setAddress ss widgetName newOSCAddress – Change the OSC address a widget outputs to. Example usage:/control/setAddress "test1" "/testtesttest"
  • /control/removeWidget s widgetName – Remove a widget from an interface. Example usage:/control/removeWidget "test1"
This work is licensed under GPL - 2009 | Powered by Wordpress using a heavily modified version of the theme aav1