Class: MIDIEvents::SystemCommon
- Inherits:
-
Object
- Object
- MIDIEvents::SystemCommon
- Includes:
- SystemMessage
- Defined in:
- lib/midi-events/messages.rb
Overview
MIDI System-Common message
Constant Summary collapse
- ID =
(0x1..0x6).freeze
- DISPLAY_NAME =
'System Common'.freeze
Constants included from SystemMessage
MIDIEvents::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.
118 119 120 121 122 123 124 125 |
# File 'lib/midi-events/messages.rb', line 118 def initialize(*args) = args.last.is_a?(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.
116 117 118 |
# File 'lib/midi-events/messages.rb', line 116 def data @data end |