Module: MIDIEvents::ChannelMessage::ClassMethods

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

Overview

For defining Channel Message class types

Instance Method Summary collapse

Instance Method Details

#propertiesObject



121
122
123
# File 'lib/midi-events/channel_message.rb', line 121

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?



128
129
130
# File 'lib/midi-events/channel_message.rb', line 128

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