Module: MIDIEvents::SystemMessage
- Included in:
- SystemCommon, SystemRealtime
- Defined in:
- lib/midi-events/system_message.rb
Overview
Common MIDI system message behavior
Constant Summary collapse
- STATUS =
0xF
Instance Method Summary collapse
-
#strip_redundant_nibble(byte) ⇒ Fixnum
In the case of something like SystemCommon.new(0xF2, 0x00, 0x08), the first nibble F is redundant because all system messages start with 0xF and it can be assumed.
Instance Method Details
#strip_redundant_nibble(byte) ⇒ Fixnum
In the case of something like SystemCommon.new(0xF2, 0x00, 0x08), the first nibble F is redundant because all system messages start with 0xF and it can be assumed. However, the this method looks to see if this has occurred and strips the redundancy
15 16 17 |
# File 'lib/midi-events/system_message.rb', line 15 def strip_redundant_nibble(byte) byte > STATUS ? (byte & 0x0F) : byte end |