Module: Patch::IO::OSC::Message
Overview
Convert between OSC message and Patch::Message objects
Instance Method Summary collapse
-
#to_osc_messages(patch, patch_message) ⇒ Array<::OSC::Message>
Convert a message object to an OSC message given the context of the given patch.
-
#to_patch_messages(patch, raw_osc) ⇒ Array<::Patch::Message>
Convert the given OSC message to Patch::Message objects using the context of the given patch.
Instance Method Details
#to_osc_messages(patch, patch_message) ⇒ Array<::OSC::Message>
Convert a message object to an OSC message given the context of the given patch
16 17 18 19 20 21 22 |
# File 'lib/patch/io/osc/message.rb', line 16 def (patch, ) = [] unless (action = get_osc_action(patch.actions, )).nil? << (action, ) end end |
#to_patch_messages(patch, raw_osc) ⇒ Array<::Patch::Message>
Convert the given OSC message to Patch::Message objects using the context of the given patch
28 29 30 31 32 33 34 |
# File 'lib/patch/io/osc/message.rb', line 28 def (patch, raw_osc) = [] unless (action = Action.find_by_address(patch.actions, raw_osc.address)).nil? << (patch, action, raw_osc) end end |