Script objects representing the different types of messages associated with a control.
The objects representing the different message types described here can be accessed via a control's messages
field.
An object representing a single MIDI message in a control's list of MIDI messages.
The following fields allow to dynamically configure some of the same properties that are available in the editor UI.
message.enabled
-- example
self.messages.MIDI[1].enabled = false
A boolean value. Enable or disable the message.
message.send
-- example
self.messages.MIDI[1].send = false
A boolean value. Enable or disable the sending of the message.
message.receive
-- example
self.messages.MIDI[1].receive = false
A boolean value. Enable or disable the receiving of the message.
message.feedback
-- example
self.messages.MIDI[1].feedback = false
A boolean value. Enable or disable allowing message feedback (sending) immediately after receiving.
message.noDuplicates
-- example
self.messages.MIDI[1].noDuplicates = true
A boolean value. Enable or disable allowing identical messages to be sent in succession.
message.connections
-- example
local firstMessage = self.messages.MIDI[1]
firstMessage.connections[1] = false
firstMessage.connections[3] = true
print(#firstMessage.connections)
> 5
A list of boolean values for each of the connections the message should be sent or received on.
This list currently has ten entries, but the number is subject to change in a future release and will always be the same number as connections available in the MIDI connection configuration.
message:trigger()
-- example
self.messages.MIDI[1]:trigger()
Trigger and potentially send the message.
Process the message in the same way as if one of its configured triggers had been set. If both the
Enabled
and Send
fields of the message are enabled, the message will be sent on its
configured connections.
Note that the No Duplicates
flag might still prevent the sending of the message.
message:data()
-- example
local message_data = self.messages.MIDI[1]:data()
sendMIDI(message_data) -- send on all connections
sendMIDI(message_data, {true, false, false, false, false}) -- send on first connection
sendMIDI(message_data, self.messages.MIDI[1].connections) -- send on message's configured connections
Return the message data prepared for sending.
Process the message based on its current configuration and return the message data in the format used by the sendMIDI
and onReceiveMIDI
functions (ie a list of byte values making up the MIDI message).
Note: The Enabled
and Send
fields will not be considered.
See Script · Global Functions · MIDI Messages.
An object representing a single OSC message in a control's list of OSC messages.
The following fields allow to dynamically configure some of the same properties that are available in the editor UI.
message.enabled
-- example
self.messages.OSC[1].enabled = false
A boolean value. Enable or disable the message.
message.send
-- example
self.messages.OSC[1].send = false
A boolean value. Enable or disable the sending of the message.
message.receive
-- example
self.messages.OSC[1].receive = false
A boolean value. Enable or disable the receiving of the message.
message.feedback
-- example
self.messages.OSC[1].feedback = false
A boolean value. Enable or disable allowing message feedback (sending) immediately after receiving.
message.noDuplicates
-- example
self.messages.OSC[1].noDuplicates = true
A boolean value. Enable or disable allowing identical messages to be sent in succession.
message.connections
-- example
local firstMessage = self.messages.OSC[1]
firstMessage.connections[1] = false
firstMessage.connections[3] = true
print(#firstMessage.connections)
> 5
A list of boolean values for each of the connections the message should be sent or received on.
This list currently has ten entries, but the number is subject to change in a future release and will always be the same number as connections available in the OSC connection configuration.
message:trigger()
-- example
self.messages.OSC[1]:trigger()
Trigger and potentially send the message.
Process the message in the same way as if one of its configured triggers had been set. If both the
Enabled
and Send
fields of the message are enabled, the message will be sent on its
configured connections.
Note that the No Duplicates
flag might still prevent the sending of the message.
message:data()
-- example
local message_data = self.messages.OSC[1]:data()
sendOSC(message_data) -- send on all connections
sendOSC(message_data, {true, false, false, false, false}) -- send on first connection
sendOSC(message_data, self.messages.OSC[1].connections) -- send on message's configured connections
Return the message data prepared for sending.
Process the message based on its current configuration and return the message data in the format used by the sendOSC
and onReceiveOSC
functions.
Note: The Enabled
and Send
fields will not be considered.
See Script · Global Functions · OSC Messages.
An object representing a single Local message in a control's list of Local messages.
The following fields allow to dynamically configure some of the same properties that are available in the editor UI.
message.enabled
-- example
self.messages.LOCAL[1].enabled = false
A boolean value. Enable or disable the message.
See Editor · Messages · Local.
message:trigger()
-- example
self.messages.LOCAL[1]:trigger()
Trigger and potentially send the message.
Process the message in the same way as if one of its configured triggers had been set. If the Enabled
field of the message is enabled, the message will be sent.
See Editor · Messages · LOCAL.
An object representing a single Gamepad message in a control's list of Gamepad messages.
The following fields allow to dynamically configure some of the same properties that are available in the editor UI.
message.enabled
-- example
self.messages.GAMEPAD[1].enabled = false
A boolean value. Enable or disable the message.
See Editor · Messages · Gamepad.
message.connections
-- example
local firstMessage = self.messages.GAMEPAD[1]
firstMessage.connections[1] = false
firstMessage.connections[3] = true
print(#firstMessage.connections)
> 4
A list of boolean values for each of the connections the message received on.
This list currently has four entries, but the number is subject to change in a future release and will always be the same number as connections available in the Gamepad connection configuration.
See Editor · Messages · Gamepad.
We use cookies to deliver website content. By continuing without changing your preferences, you agree to our use of cookies.