File Duplex/OscDevice.lua
Functions
OscDevice:__init (name, message_stream, prefix, address, port_in, port_out) | Initialize OSCDevice class |
OscDevice:_msg_to_string (msg) | Create string representation of OSC message: e.g. |
OscDevice:_unpack_messages (message_or_bundle, messages) | Recursively unpacks all OSC messages from the given bundle or message. |
OscDevice:open () | Create the OSC client/server sockets, set prefix (if any) |
OscDevice:point_to_value (pt, elm, ceiling) | Convert the point to an output value. |
OscDevice:produce_entry (vars, value) | Produce an OSC message value entry. |
OscDevice:queue_osc_message (message, value) | Queue a message instead of sending it right away. |
OscDevice:receive_osc_message (value_str) | Look up value, once we have unpacked the message |
OscDevice:release () | Release the device |
OscDevice:send_osc_bundle () | Send a queued bundle of OSC messages |
OscDevice:send_osc_message (message, value) | Send a OSC message right away |
OscDevice:set_device_prefix (prefix) | Set prefix for this device (a pattern which is appended to all outgoing traffic, and also act as a filter for incoming messages) |
OscDevice:socket_error (error_message) | En error happened in the servers background thread (this should not happen) |
OscDevice:socket_message (socket, binary_data) | Receive/unpack incoming osc messages: largely identical to the MidiDevice implementation, except that we look for the control-map "action" instead of the "value" attribute |
Functions
- OscDevice:__init (name, message_stream, prefix, address, port_in, port_out)
-
Initialize OSCDevice class
Parameters:
-
name
: (String) the friendly name of the device -
message_stream
: (MessageStream) the msg-stream we should attach to -
prefix
: (String) the OSC prefix to use -
address
: (String) the OSC address (can be an IP address) -
port_in
: (Number) the OSC input port -
port_out
: (Number) the OSC output port
-
- OscDevice:_msg_to_string (msg)
-
Create string representation of OSC message: e.g. "/this/is/the/pattern 1 2 3"
Parameters:
-
msg
: (renoise.Osc.Message)
-
- OscDevice:_unpack_messages (message_or_bundle, messages)
-
Recursively unpacks all OSC messages from the given bundle or message. when message_or_bundle is a single message, only this one will be added to the given message list
Parameters:
-
message_or_bundle
: (renoise.Osc.Message or renoise.Osc.Bundle) -
messages
: (Table) table to insert unpacked messages into
-
- OscDevice:open ()
- Create the OSC client/server sockets, set prefix (if any)
- OscDevice:point_to_value (pt, elm, ceiling)
-
Convert the point to an output value. If the point has multiple values, it is describing a multidimensional value, such as a tilt sensor or XY-pad. In such a case, the method will return a table of values
Parameters:
-
pt
: (CanvasPoint), point containing the current value -
elm
: (Table), control-map parameter -
ceiling
: (Number), the UIComponent ceiling value
Return value:
- value (Number, or Table of Numbers)
-
- OscDevice:produce_entry (vars, value)
-
Produce an OSC message value entry. If only "vars" is defined, it will be treated as a standalone floating-point value. Otherwise, "vars" will indicate the type of value - Integer is "%i", while floating-point is "%f"
Parameters:
-
vars
: (Number or String), value or the type of value -
value
: (Number)
-
- OscDevice:queue_osc_message (message, value)
-
Queue a message instead of sending it right away. Some devices need data to arrive in fewer packets due to network conditions
Parameters:
-
message
: (String) the message string -
value
: (Number or Table) the value(s) to inject
-
- OscDevice:receive_osc_message (value_str)
-
Look up value, once we have unpacked the message
Parameters:
-
value_str
: (String), control-map string
-
- OscDevice:release ()
- Release the device
- OscDevice:send_osc_bundle ()
-
Send a queued bundle of OSC messages
See also:
- OscDevice:send_osc_message (message, value)
-
Send a OSC message right away
Parameters:
-
message
: (String) the message string -
value
: (Number or Table) the value(s) to inject
-
- OscDevice:set_device_prefix (prefix)
-
Set prefix for this device (a pattern which is appended to all outgoing traffic, and also act as a filter for incoming messages)
Parameters:
-
prefix
: (String)
-
- OscDevice:socket_error (error_message)
-
En error happened in the servers background thread (this should not happen)
Parameters:
-
error_message
:
-
- OscDevice:socket_message (socket, binary_data)
-
Receive/unpack incoming osc messages: largely identical to the MidiDevice implementation, except that we look for the control-map "action" instead of the "value" attribute
Parameters:
-
socket
: ( -
binary_data
: [[
-