Class: MIDI::SystemExclusive

Inherits:
SystemCommon show all
Defined in:
lib/midilib/event.rb

Instance Attribute Summary collapse

Attributes inherited from Event

#delta_time, #print_channel_numbers_from_one, #print_decimal_numbers, #print_note_names, #status, #time_from_start

Instance Method Summary collapse

Methods inherited from Event

#<=>, #channel_to_s, #number_to_s, #quantize_to

Constructor Details

#initialize(data, delta_time = 0) ⇒ SystemExclusive

Returns a new instance of SystemExclusive.


269
270
271
272
# File 'lib/midilib/event.rb', line 269

def initialize(data, delta_time = 0)
  super(SYSEX, delta_time)
  @data = data
end

Instance Attribute Details

#dataObject

Returns the value of attribute data


267
268
269
# File 'lib/midilib/event.rb', line 267

def data
  @data
end

Instance Method Details

#data_as_bytesObject


274
275
276
277
278
279
280
281
# File 'lib/midilib/event.rb', line 274

def data_as_bytes
  data = []
  data << @status
  data << Utils.as_var_len(@data.length)
  data << @data
  data << EOX
  data.flatten
end

#to_sObject


283
284
285
# File 'lib/midilib/event.rb', line 283

def to_s
  return super << "sys ex"
end