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
- DISPLAY_NAME =
"System Common"
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.
112 113 114 115 116 117 118 119 |
# File 'lib/midi-message/messages.rb', line 112 def initialize(*args) = args.last.kind_of?(Hash) ? args.pop : {} @const = [:const] id = @const.nil? ? args.shift : @const.value id = strip_redundant_nibble(id) (0xF, id) @data = args.slice(0..1) end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
110 111 112 |
# File 'lib/midi-message/messages.rb', line 110 def data @data end |