class Bernstein::OSCConnection

Public Class Methods

configure!(options = {}) click to toggle source
# File lib/bernstein/osc_connection.rb, line 9
def self.configure!(options = {})
  @options.merge!(options || {})
  @connection = OSC::Client.new @options[:port], @options[:host]
end
send_message(message, with_message_id = true) click to toggle source
# File lib/bernstein/osc_connection.rb, line 14
def self.send_message(message, with_message_id = true)
  osc_message = message.osc_message
  osc_message = OSC::Bundle.new(nil, osc_message, OSC::Message.new('/message_id', message.id)) if with_message_id
  @connection.send osc_message
end