Class: Vissen::Input::Message::ControlChange

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

Overview

From the MIDI Association:

This message is sent when a controller value changes. Controllers
include devices such as pedals and levers. Controller numbers 120-127
are reserved as "Channel Mode Messages".

Constant Summary collapse

STATUS =
0xB0

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?, matcher, #valid?

Methods included from Vissen::Input::Message

#channel, #initialize, #status, #valid?

Instance Method Details

#numberInteger

Returns the control number.

Returns:

  • (Integer)

    the control number.



14
15
16
# File 'lib/vissen/input/message/control_change.rb', line 14

def number
  data[1]
end

#valueInteger

Returns the control value.

Returns:

  • (Integer)

    the control value.



19
20
21
# File 'lib/vissen/input/message/control_change.rb', line 19

def value
  data[2]
end