Class: MIDIMessage::SystemRealtime

Inherits:
Object
  • Object
show all
Includes:
ShortMessage
Defined in:
lib/midi-message/system_message.rb

Overview

MIDI System-Realtime message

Instance Attribute Summary

Attributes included from ShortMessage

#name, #status, #verbose_name

Instance Method Summary collapse

Methods included from ShortMessage

#initialize_short_message, #to_a, #to_hex_s

Constructor Details

#initialize(*a) ⇒ SystemRealtime

Returns a new instance of SystemRealtime.



34
35
36
37
38
39
# File 'lib/midi-message/system_message.rb', line 34

def initialize(*a)
  options = a.last.kind_of?(Hash) ? a.pop : {} 
  @const = options[:const]
  id = @const.nil? ? a[0] : @const.value
  initialize_short_message(0xF, id)
end

Instance Method Details

#idObject



41
42
43
# File 'lib/midi-message/system_message.rb', line 41

def id
  @status[1]
end