Class: MIDIMessage::SystemExclusive::Command
- Inherits:
-
Object
- Object
- MIDIMessage::SystemExclusive::Command
- Includes:
- Base
- Defined in:
- lib/midi-message/system_exclusive.rb
Overview
A SysEx command message a command message is identified by having a status byte equal to 0x12
Constant Summary collapse
- TypeByte =
alias_method :value=, :data=
0x12
Constants included from Base
Base::EndByte, Base::StartByte
Instance Attribute Summary collapse
-
#data ⇒ Object
(also: #value)
Returns the value of attribute data.
Attributes included from Base
Instance Method Summary collapse
-
#initialize(address, data, options = {}) ⇒ Command
constructor
A new instance of Command.
Methods included from Base
#name, #to_a, #to_hex_s, #to_numeric_byte_array, #type_byte
Constructor Details
#initialize(address, data, options = {}) ⇒ Command
Returns a new instance of Command.
89 90 91 92 93 |
# File 'lib/midi-message/system_exclusive.rb', line 89 def initialize(address, data, = {}) # store as a byte if it's a single byte @data = (data.kind_of?(Array) && data.length.eql?(1)) ? data[0] : data initialize_sysex(address, ) end |
Instance Attribute Details
#data ⇒ Object Also known as: value
Returns the value of attribute data.
83 84 85 |
# File 'lib/midi-message/system_exclusive.rb', line 83 def data @data end |