Module xOscDevice

xOscDevice represents a networked location which is able to send and/or receive OSC messages .

The class defines certain methods, according to the Renoise Socket API: socketerror(),socketmessage()

How to use

Create an instance and supply any of these arguments:

xOscDevice{

active
name
prefix
address
port_in
port_out
callback
bundling_enabled
bundle_limit

}

Functions

__init (...) [Constructor] supply a table to initialize the class
_unpack_messages (message_or_bundle, messages) Recursively unpacks all OSC messages from the given bundle or message.
socket_error (error_message) An error happened in the servers background thread (this should not happen)
socket_message (socket, binary_data) Receive/unpack osc messages
send (xmsg) build raw message, send or add to queue

Tables

self.message_queue table, used when bundling is enabled

Fields

self.active string, the state of the device
self.name string, the device name (for display purposes)
self.prefix string, the 'prefix' part when defined, only messages which begin with the prefix are matched also, the prefix is appended to any outgoing messages
self.address string, the 'address' part (IP or hostname)
self.port_in integer, the input port
self.port_out integer, the output port
self.callback function, where to pass received messages
self.bundling_enabled boolean, when true we queue messages and send them on idle time
self.bundle_limit int, output when reaching this number of queued messages (0 = disable)
self.modified_observable set when properties have changed which require re-initialize
self.idle_notifier function
self.client (renoise.Socket.SocketClient)
self.server (renoise.Socket.SocketServer)


Functions

__init (...)
[Constructor] supply a table to initialize the class

Parameters:

  • ...
_unpack_messages (message_or_bundle, messages)
Recursively unpacks all OSC messages from the given bundle or message.
when messageorbundle 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
socket_error (error_message)
An error happened in the servers background thread (this should not happen)

Parameters:

  • error_message
socket_message (socket, binary_data)
Receive/unpack osc messages

Parameters:

  • socket (contains socket.port and socket.address)
  • binary_data (raw, packetized socket data)
send (xmsg)
build raw message, send or add to queue

Parameters:

  • xmsg , xOscMessage

Returns:

  1. bool, true when message was transmitted
  2. string, message when failed

Tables

self.message_queue
table, used when bundling is enabled

Fields

self.active
string, the state of the device
self.name
string, the device name (for display purposes)
self.prefix
string, the 'prefix' part when defined, only messages which begin with the prefix are matched also, the prefix is appended to any outgoing messages
self.address
string, the 'address' part (IP or hostname)
self.port_in
integer, the input port
self.port_out
integer, the output port
self.callback
function, where to pass received messages
  • pattern (without prefix)
self.bundling_enabled
boolean, when true we queue messages and send them on idle time
self.bundle_limit
int, output when reaching this number of queued messages (0 = disable)
self.modified_observable
set when properties have changed which require re-initialize
self.idle_notifier
function
self.client
(renoise.Socket.SocketClient)
self.server
(renoise.Socket.SocketServer)
generated by LDoc 1.4.2