<< Click to Display Table of Contents >> Navigation: Basic concepts > Language level procedures > SendOSCMessage |
Syntax:
SendOSCMessage OSCMessage [OSCMessage] [target] [Synced]
OSCMessage: { OSCAddress Arguments }
Arguments: expressions of type integer, floating point or string, separated by commas. The first argument must either be a valid OSC address of type OSCAddress or type String containing a valid OSCAddress
target: to ipAddress : port
ipAddress: a valid IP address or resolvable domain name
port: an integer port
The target clause is optional. If it is not included, SendOSCMessage will use the default target and port as defined in OSC options.
Examples:
1.SendOSCMessage { /Start } // Send a single message with no arguments to the default remote IP address and port
2.SendOSCMessage { /SetBPM, 120.0 } // Send a single OSC message to the default remote IP address and port
3.SendOSCMessage { /SetBPM, 120.0 } to "192.168.1.34" : 1234 // Send the message to the specified IP address and port number
4.SendOSCMessage { /Songname, "My Song" } { /SongLength, 3.5 } { /SongTempo, 80} { /TimeSignature, 5, 4 }
The last example consists of four separate messages. In this case, the messages will be sent out together as an OSC Bundle.
Note that commas are used to separate arguments in each messages. However, if you are sending a bundle, commas are not used to separate individual OSC messages
Synced
You should generally not use this option unless you need to send a really large number of messages in which using this option will cause all the messages to be buffered and sent out on a separate thread.