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



125
126
127
# File 'lib/midi-message/channel_message.rb', line 125

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?



132
133
134
# File 'lib/midi-message/channel_message.rb', line 132

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