Class: Vissen::Input::Message::Aftertouch

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

Overview

From the MIDI Association:

Polyphonic Key Pressure (Aftertouch). This message is most often sent by pressing down on the key after it "bottoms out".

Constant Summary collapse

STATUS =
0xA0

Constants inherited from Base

Base::DATA_LENGTH

Constants included from Vissen::Input::Message

CHANNEL_MASK, DATA_LENGTH, 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

#noteInteger

Returns the note value.

Returns:

  • (Integer)

    the note value.



15
16
17
# File 'lib/vissen/input/message/aftertouch.rb', line 15

def note
  data[1]
end

#preassureInteger

Returns the preassure value.

Returns:

  • (Integer)

    the preassure value.



20
21
22
# File 'lib/vissen/input/message/aftertouch.rb', line 20

def preassure
  data[2]
end