Class: MIDIMessage::SystemCommon
- Inherits:
-
Object
- Object
- MIDIMessage::SystemCommon
- Includes:
- SystemMessage
- Defined in:
- lib/midi-message/messages.rb
Overview
MIDI System-Common message
Constant Summary collapse
- ID =
0x1..0x6
- DISPLAY_NAME =
"System Common"
Constants included from SystemMessage
MIDIMessage::SystemMessage::STATUS
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(*args) ⇒ SystemCommon
constructor
A new instance of SystemCommon.
Methods included from SystemMessage
included, #strip_redundant_nibble
Constructor Details
#initialize(*args) ⇒ SystemCommon
Returns a new instance of SystemCommon.
134 135 136 137 138 139 140 141 |
# File 'lib/midi-message/messages.rb', line 134 def initialize(*args) = args.last.kind_of?(Hash) ? args.pop : {} @const = [:const] id = @const.nil? ? args.shift : @const.value id = strip_redundant_nibble(id) (SystemMessage::STATUS, id) @data = args.slice(0..1) end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
132 133 134 |
# File 'lib/midi-message/messages.rb', line 132 def data @data end |