ControllerWatcher Class

Represents a monitored controller Returned from the OnscreenKeyboard#watch method.

class ControllerWatcher extends EventEmitter<any> {
    get channel(): number;
    get kind(): MidiControllerKind;
    get controller(): number;
    get value(): number;
    unwatch(): void;
}

#Properties

#channel

Returns the MIDI channel number of controller being watched

get channel(): number;

#controller

Returns the number of the controller being watched

get controller(): number;

#kind

Returns the kind of controller being watched

get kind(): MidiControllerKind;

#value

Returns the current value of the controller

get value(): number;

#Methods

#unwatch()

Stops monitoring this controller for changes

unwatch(): void;

#Events

#'changed' Event

Fired when the controller value changes

controllerWatcher.on('changed', (value: Number, source: ControllerWatcher) => { });
  • value The new value of the controller

  • source This object