Class: Vissen::Input::Message::ProgramChange

Inherits:
Base
  • Object
show all
Defined in:
lib/vissen/input/message/program_change.rb

Overview

From the MIDI Association:

This message sent when the patch number changes.

Constant Summary collapse

DATA_LENGTH =
2
STATUS =
0xC0

Constants included from Vissen::Input::Message

CHANNEL_MASK, STATUS_MASK

Instance Attribute Summary

Attributes included from Vissen::Input::Message

#data, #timestamp

Instance Method Summary collapse

Methods inherited from Base

[], create, factory, match, match?, matcher, #valid?

Methods included from Vissen::Input::Message

#channel, #fetch, #initialize, #status, #to_h, #valid?

Instance Method Details

#numberInteger

Returns the program number.

Returns:

  • (Integer)

    the program number.



16
17
18
# File 'lib/vissen/input/message/program_change.rb', line 16

def number
  data[1]
end