Module: MIDIMessage::ChannelMessage::ClassMethods

Defined in:
lib/midi-message/channel_message.rb

Overview

For defining Channel Message class types

Instance Method Summary collapse

Instance Method Details

#propertiesObject



101
102
103
# File 'lib/midi-message/channel_message.rb', line 101

def properties
  const_get("DATA") if const_defined?("DATA")
end

#second_data_byte?Boolean

Does the schema of this Channel Message carry a second data byte? eg. NoteMessage does, and ProgramChange doesn“t

Returns:

  • (Boolean)

    Is there a second data byte on this message type?



108
109
110
# File 'lib/midi-message/channel_message.rb', line 108

def second_data_byte?
  properties.nil? || (properties.length-1) > 1
end