Module: Patch::IO::OSC
- Extended by:
- OSC
- Included in:
- OSC
- Defined in:
- lib/patch/io/osc.rb,
lib/patch/io/osc/action.rb,
lib/patch/io/osc/client.rb,
lib/patch/io/osc/server.rb,
lib/patch/io/osc/message.rb
Overview
Receive OSC messages and do something with them
Defined Under Namespace
Modules: Action, Message Classes: Client, Server
Constant Summary collapse
- KEY =
Key that will be used by Patch to identify the module
:osc
Instance Method Summary collapse
-
#new_from_config(config, options = {}) ⇒ ::Patch::IO::OSC::Server
Instantiate an OSC server and/or client using the given config.
Instance Method Details
#new_from_config(config, options = {}) ⇒ ::Patch::IO::OSC::Server
Instantiate an OSC server and/or client using the given config
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/patch/io/osc.rb', line 26 def new_from_config(config, = {}) = { :log => [:log] } if config[:server].nil? unless config[:client].nil? [:id] = config[:id] Client.new(config[:client][:host], config[:client][:port], ) end else [:echo] = config[:client] Server.new(config[:id], config[:server][:port], ) end end |