Loading...
This chapter gives an overview of the members available for the OSC TCP device in the Configuration dialog.
Please read the chapter "OSC TCP" 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_TCP(deviceName or ID) |
Example: Alternative Example: |
This gives access to all further members of the device "OSC_TCP" 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_TCPName.Disable |
Example: Alternative Example: |
This disables the TCP 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_TCPName.Enable |
Example: Alternative Example: |
This enables the TCP 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_TCPName.IpAddress |
Example: Alternative Example: |
This returns the IP address of the TCP 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_TCP1.IpAddress In return, you can also assign an IP address to the TCP OSC device. WD automatically connects to it afterwards. |
OSC_TCPName.IsConnected |
Example: Alternative Example: |
This member returns the connection status for the TCP OSC device as a Boolean value. The result is "True" if the connection is established and "False" if it is not. You could also write it into a Widget, e.g. a Label via the script: Label1.Text = OSC_TCP1.IsConnected |
OSC_TCPName.IsEnabled |
Example: Alternative Example: |
This member returns the status of the check box "Enable" for the TCP 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_TCP1.IsEnabled |
OSC_TCPName.Port |
Example: Alternative Example: |
This returns the port number of the TCP 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_TCP1.Port In return, you can also assign another port to the TCP OSC device. WD automatically connects to it afterwards. |
OSC_TCPName.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 TCP device named "OSC_TCP1". 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_TCP.SendRaw which does refer to an OSC Table. |
OSC_TCPName.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_TCP.Send or OSC_Table.Send respectively. Both require to setup an OSC Table which stores OSC addresses and their parameter types as "Aliases". |