OSCCommands implements a couple of methods that let the user collect OSC command-names (including their path/namespace - e.g. '/my, super/long/and/winding/pth/to/cmdname' - resp. the number of addressable msg-slots. E.g. from an orientation-sensor: [ '/cmdname', <x-value>, <y-value>, <z-value> ]
(one command-name, 3 slots). Collected command-names can be stored to disk under a name set by the user. For convenience OSCCommands has its own GUI which shows the user which names have already been collected resp. allowing her/him to remove unwanted names from the list. Command-names will be stored to disk in a file named "OSCCommands" in the same directory as the class-file itself.
Starts the collection-process when set to true
. Stop the process by calling the same method, argument play
set to false
play |
a Boolean, indicating whether the process shall be started or stopped - default: |
this (OSCCommands)
Collect OSC command-names and the sizes of their messages (i.e. how many slots are sent within the message). Command-names will be stored in *tempIPsAndCmds, an Event, under a key thats made up of a combination of the IP-address and port: <IP-address>:<port>
.
play |
a Boolean, indicating whether the process shall be started or stopped - default: |
this (OSCCommands)
Save the current list of commands to disk.
deviceName |
a String or a Symbol representing the name of the current collection. If the collection-process is still active it will be stopped. |
this (OSCCommands)
Open the interactive GUI that shows the user all currently collected command-names resp. remove unwanted names.
this (OSCCommands)
If a deviceName
has been given return an Event with command-names stored to disk under the device-name deviceName
. Else return an Event with all currently stored commands resp. their keys.
deviceName |
a String or a Symbol representing the name under which the list of commands has been stored. |
an Event
Removes all commands stored to disk under the name given in deviceName
.
deviceName |
this (OSCCommands)
an Event keeping command-names and IP-addresses/ports collected by *collectTempIPsAndCmds
an Event
Indicate whether a process invoked by *collectTempIPsAndCmds is currently running or not.
a Boolean
For the following example you will have to have installed an application capable of sending OSC-messages somewhere in your local network (it might be e.g. an application on your computer or some OSC-controller on a mobile phone). Very likely you will have to tell this application to send its output to the IP-address of the computer where SuperCollider is running resp. to the receiving port of SC which is by default 57120
(setting a non-standard port should work using SC >= 3.5).