OSCMKtlDevice provides an internal interface for OSC devices, interfaces or programs that send data to your computer via OSC.
When creating an MKtl by desc name, e.g. MKtl(\x, "*drive");
, a new OSCMKtlDevice using that description is created. Because actual network ports and addresses may differ from the description file, some adapting may be needed, see Connecting_OSC_devices
For most devices or interfaces, this requires that someone has already made a description file for the device; if there is none, it is easy to make one following the instructions here: How_to_create_a_description_file and here: How_to_create_a_description_file_for_OSC
More general info can be found in MKtl and MKtlDevice .
Find all currently opened OSC devices.
post |
Whether or not to post about the OSC devices. |
Post all access code for device that could be used by name.
protocol name, \osc.
Initialize the sourceDeviceDict and look for available OSC devices.
force |
Whether or not to do this again if it was already done before. |
Creates a new instance of OSCMKtlDevice.
name |
The short name of the controller as it shows up in the list of found devices. |
devInfo |
The device |
parentMKtl |
The instance of MKtl that this MKtlDevice will belong to. |
multiIndex |
if multiple instances are present, indicate which one. (not really used with OSC, mainly for method compatibility with other variants of MKtlDevices. |
Initilize all elements and set OSCFuncs for them
Initilize all collectives and set OSCFuncs for them
A Dictionary containing all the OSCFuncs that this device is using.
Free all OSCFuncs.
De-initialize all elements and collectives.
Send the value of the element or collective to the OSC device; called if you set the value of an MKtlElement that is an output.
key |
The key of the element or collective. |
val |
The value to which it is set. A collective should send an Array. |
The port to which the OSC device/interface is sending data to. If this is configurable in the OSC device or interface, then it is easier to use sclang's default port of 57120 and leave it undefined.
Updates the device that is the source for this OSCMKtlDevice and reconfigures OSC communications.
hostname |
The hostname or IP address of the source |
port |
The port of the source |
Updates the device that is the destination for this OSCMKtlDevice and reconfigures OSC communications.
hostname |
The hostname or IP address of the destination |
port |
The port of the destination |
Updates the device that is both the source and destination for this OSCMKtlDevice and reconfigures OSC communications. Use this method if the source and destination lies in the same program on the same machine.
hostname |
The hostname or IP address of the source/destination |
port |
The port of the source/destination |