Module xOscClient

xOscClient wraps a renoise.Socket with some handy methods .

  • Connects to the built-in OSC server in Renoise,
  • Produce realtime messages (notes or MIDI messages)

Functions

__init (table) [Constructor] Accepts a table argument for initializing the class
create (osc_host, osc_port) [Class] Initialize the xOscClient class
trigger_instrument (note_on, instr, track, note, velocity) [Class] Trigger instrument-note
trigger_midi (t) [Class] Trigger standard midi-message
trigger_auto (xmsg) [Class] Trigger 'automatic MIDI' using the internal OSC client if notes, route to specified track + instrument - else, pass as raw MIDI
trigger_raw (xmsg) [Class] Trigger 'raw MIDI' (makes notes MIDI-mappable)
_detect_server () Confirm that the internal OSC server is configured and running - TODO: switch to API method for detection once available, this method is only reliable for as long as there are no more than 3 concurrent attempts (after that, the activeclipboardindex will point to the original value)
_test_idle_notifier () Server test - check if the property was "instantly" changed (0.2s)

Fields

self.osc_host string
self.osc_port int
self._connection the socket connection, nil if not established


Functions

__init (table)
[Constructor] Accepts a table argument for initializing the class

Parameters:

  • table {

    osc_host (string),
    osc_port (number)
    

    }

create (osc_host, osc_port)
[Class] Initialize the xOscClient class

Parameters:

  • osc_host (string) the host-address name (can be an IP address)
  • osc_port (int) the host port

Returns:

  1. boolean,
  2. string, error message when failed
trigger_instrument (note_on, instr, track, note, velocity)
[Class] Trigger instrument-note

Parameters:

  • note_on (bool), true when note-on and false when note-off
  • instr (int), the Renoise instrument index
  • track (int) the Renoise track index
  • note (int), the desired pitch, 0-120
  • velocity (int), the desired velocity, 0-127

Returns:

    bool, true when triggered
trigger_midi (t)
[Class] Trigger standard midi-message

Parameters:

  • t (table), a ready-to-send MIDI message

Returns:

    bool, true when triggered
trigger_auto (xmsg)
[Class] Trigger 'automatic MIDI' using the internal OSC client if notes, route to specified track + instrument - else, pass as raw MIDI

Parameters:

  • xmsg (xMidiMessage or xOscMessage)

Returns:

    bool, true when triggered
trigger_raw (xmsg)
[Class] Trigger 'raw MIDI' (makes notes MIDI-mappable)

Parameters:

  • xmsg (xMidiMessage or xOscMessage)

Returns:

  1. bool, true when triggered
  2. string, error message when failed
_detect_server ()
Confirm that the internal OSC server is configured and running - TODO: switch to API method for detection once available, this method is only reliable for as long as there are no more than 3 concurrent attempts (after that, the activeclipboardindex will point to the original value)
_test_idle_notifier ()
Server test - check if the property was "instantly" changed (0.2s)

Fields

self.osc_host
string
self.osc_port
int
self._connection
the socket connection, nil if not established
generated by LDoc 1.4.2