Class: MIDIMessage::SystemRealtime

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

Overview

MIDI System-Realtime message

Constant Summary collapse

ID =
0x8..0xF
DISPLAY_NAME =
"System Realtime"

Constants included from SystemMessage

MIDIMessage::SystemMessage::STATUS

Instance Method Summary collapse

Methods included from SystemMessage

included, #strip_redundant_nibble

Constructor Details

#initialize(*args) ⇒ SystemRealtime


155
156
157
158
159
160
161
# File 'lib/midi-message/messages.rb', line 155

def initialize(*args)
  options = args.last.kind_of?(Hash) ? args.pop : {}
  @const = options[:const]
  id = @const.nil? ? args.first : @const.value
  id = strip_redundant_nibble(id)
  initialize_message(SystemMessage::STATUS, id)
end

Instance Method Details

#idObject


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

def id
  @status[1]
end