Loading...
This chapter gives an overview of the members available for the OSC UDP device in the Configuration dialog.
Please read the chapter "OSC UDP" if you would like to know how to add and use this device. As explained in the topic"Object and Member Notation (dot syntax)", all kinds of objects can be addressed in the scripting language by using their members which set (or return if applicable) properties or methods of that object. Please refer to the chapter "Script Language" for more details about scripting in general.
Project.OSC_UDP(deviceName or ID) |
Example: Alternative Example: |
This gives access to all further members of the device "OSC_UDP" from the Configuration dialog. Using the Project object is an alternative to addressing the device directly by entering its name. The Project object allows to address the device through its name or ID. Substituting the ID with a dynamic variable allows automation. Actions can be performed on many devices of the same type simultaneously, e.g. by using for-loops: |
OSC_UDPName.Disable |
Example: Alternative Example: |
This disables the UDP OSC device in the Configuration dialog as if the "Enable" check box in the window was unchecked. Use the .Enable member to reverse this command. |
OSC_UDPName.Enable |
Example: Alternative Example: |
This enables the UDP OSC device in the Configuration dialog as if the "Enable" check box in the window was checked. Use the .Disable member to reverse this command. |
OSC_UDPName.IpAddress |
Example: Alternative Example: |
This returns the IP address of the UDP OSC device as a string. The result could look as follows: 10.169.80.10 You could also write it into a Widget, e.g. a Label via the script: Label1.Text = OSC_UDP1.IpAddress In return, you can also assign an IP address to the UDP OSC device. WD automatically connects to it afterwards. |
OSC_UDPName.IsEnabled |
Example: Alternative Example: |
This member returns the status of the check box "Enable" for the UDP OSC device in the Configuration dialog as a string or Boolean value. The result is "True" if the connection is enabled and "False" if it is currently not enabled. You could also write it into a Widget, e.g. a Label via the script: Label1.Text = OSC_UDP1.IsEnabled |
OSC_UDPName.LocalPort |
Example: Alternative Example: |
This returns the local port number of the UDP OSC device in the Configuration dialog as an integer value. The result could look as follows: 10001 You could also write it into a Widget, e.g. a Label via the script: Label1.Text = OSC_UDP1.LocalPort In return, you can also assign another port to the UDP OSC device. WD automatically connects to it afterwards. |
OSC_UDPName.RemotePort |
Example: Alternative Example: |
This returns the remote port number of the UDP OSC device in the Configuration dialog as an integer value. The result could look as follows: 10001 You could also write it into a Widget, e.g. a Label via the script: Label1.Text = OSC_UDP1.RemotePort In return, you can also assign another port to the UDP OSC device. WD automatically connects to it afterwards. |
OSC_UDPName.Send(tableName,aliasName,value) |
Example: Alternative Example: |
This sends the value "1" to the OSC address stored in OSC Table_1 under the alias "page". The command uses the connection from the OSC UDP device named "OSC_UDP1". Keep in mind that the value type must correspond to the defined type. When you defined in the OSC Table that an integer value needs to be sent, it will not work to send a string value. You might need to convert a value first with the available data type specific members, e.g.: In case you defined more than one value in an Alias, wrap the individual values in a list, e.g.: Literal text should always be enclosed in either single or double quotation marks; otherwise, the text is handled like a variable. Alternatively, you can also send a message via the commands: OSC_Table.Send, or OSC_UDP.SendRaw which does refer to an OSC Table. |
OSC_UDPName.SendRaw(OSC Address,OSC Type Tag[ f/i/s/b],values) |
Example: Alternative Example: |
This sends the value "1" (formatted as a list!) to the OSC address "/page" and defines that the OSC data type is int32. The following type tags are supported. For more information, please see https://opensoundcontrol.stanford.edu/spec-1_0.html f = float32 Keep in mind that the value type must correspond to the OSC type tag. When you chose the "i" tag, it will not work to send a string value. You might need to convert a value first with the available data type specific members, e.g.: In case you need to send more than one value, simply append the type tags without any separator and wrap the individual values in a list, e.g.: Literal text should always be enclosed in either single or double quotation marks; otherwise, the text is handled like a variable. Alternatively, you can also send a message via the commands: OSC_UDP.Send or OSC_Table.Send respectively. Both require to setup an OSC Table which stores OSC addresses and their parameter types as "Aliases". |