Class: MIDIEvents::SystemExclusive::Command

Inherits:
Object
  • Object
show all
Includes:
MIDIEvents::SystemExclusive
Defined in:
lib/midi-events/messages.rb

Overview

A SysEx command message A command message is identified by having a status byte equal to 0x12

Constant Summary collapse

TYPE =
0x12

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address, data, options = {}) ⇒ Command

Returns a new instance of Command.



168
169
170
171
172
173
174
175
176
# File 'lib/midi-events/messages.rb', line 168

def initialize(address, data, options = {})
  # store as a byte if it's a single byte
  @data = if data.is_a?(Array) && data.length == 1
    data.first
  else
    data
  end
  initialize_sysex(address, options)
end

Instance Attribute Details

#dataObject Also known as: value

Returns the value of attribute data.



163
164
165
# File 'lib/midi-events/messages.rb', line 163

def data
  @data
end