Class: MIDI::Realtime

Inherits:
Event
  • Object
show all
Defined in:
lib/midilib/event.rb

Direct Known Subclasses

ActiveSense, Clock, Continue, Start, Stop, SystemReset

Instance Attribute Summary

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(status, delta_time) ⇒ Realtime

Returns a new instance of Realtime.


343
344
345
# File 'lib/midilib/event.rb', line 343

def initialize(status, delta_time)
  super(status, delta_time)
end

Instance Method Details

#data_as_bytesObject


347
348
349
350
# File 'lib/midilib/event.rb', line 347

def data_as_bytes
  data = []
  data << @status
end

#to_sObject


352
353
354
# File 'lib/midilib/event.rb', line 352

def to_s
  return super << "realtime #{number_to_s(@status)}"
end