Module: MIDIEvents::SystemExclusive::Builder
Class Method Summary collapse
-
.build(*bytes) ⇒ Object
Convert raw MIDI data to a SysEx message object.
Instance Method Summary collapse
-
#build(*bytes) ⇒ Object
Convert raw MIDI data to a SysEx message object.
Class Method Details
.build(*bytes) ⇒ Object
Convert raw MIDI data to a SysEx message object
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/midi-events/system_exclusive.rb', line 190 def build(*bytes) if is_sysex?(bytes) # if the 4th byte isn't status, we will just make this a Message object # -- this may need some tweaking = (bytes) if .nil? Message.new(bytes) else (, bytes) end end end |
Instance Method Details
#build(*bytes) ⇒ Object
Convert raw MIDI data to a SysEx message object
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/midi-events/system_exclusive.rb', line 190 def build(*bytes) if is_sysex?(bytes) # if the 4th byte isn't status, we will just make this a Message object # -- this may need some tweaking = (bytes) if .nil? Message.new(bytes) else (, bytes) end end end |