class Vissen::Input::Message::ControlChange

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”.

Constants

STATUS

@see Message

Protected Class Methods

klass_matcher() click to toggle source

The control change message is special in that it is only valid when the second byte takes values lower than 120. We therefore need to override `Base.klass_matcher`.

FIXME: other matchers created may not be correct.

# File lib/vissen/input/message/control_change.rb, line 33
def klass_matcher
  super do |d|
    (d[0] & STATUS_MASK) == STATUS && d[1] < 120
  end
end

Public Instance Methods

number() click to toggle source

@return [Integer] the control number.

# File lib/vissen/input/message/control_change.rb, line 16
def number
  data[1]
end
value() click to toggle source

@return [Integer] the control value.

# File lib/vissen/input/message/control_change.rb, line 21
def value
  data[2]
end