Class: MIDIMessage::SystemExclusive::Command

Inherits:
Object
  • Object
show all
Includes:
MIDIMessage::SystemExclusive
Defined in:
lib/midi-message/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

Constants included from MIDIMessage::SystemExclusive

DELIMITER, DISPLAY_NAME, ID

Constants included from MIDIMessage

ChannelPressure, Controller, PolyAftertouch, PolyPressure, PolyphonicPressure, VERSION

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MIDIMessage::SystemExclusive

included, new

Methods included from MIDIMessage

parse, with_context

Constructor Details

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


189
190
191
192
193
194
195
196
197
# File 'lib/midi-message/messages.rb', line 189

def initialize(address, data, options = {})
  # store as a byte if it's a single byte
  @data = if data.kind_of?(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


184
185
186
# File 'lib/midi-message/messages.rb', line 184

def data
  @data
end