NoteOffResponder:
Filter:
Classes | External Control > MIDI

NoteOffResponder : NoteOnResponder : MIDIResponder : Object

allow functions to be registered to respond to MIDI noteOff events

Description

NOTE: SC 3.5 added the MIDIFunc and MIDIdef classes. These are faster, and aim to have a more convenient, logical and consistent interface, which shares a common design with OSCFunc and OSCdef. They also provide support for all MIDI message types.

Class Methods

NoteOffResponder.new(function, src, chan, num, veloc, install: true, swallowEvent: false)

From superclass: NoteOnResponder

Arguments:

function

A Function to be evaluated. Arguments passed to the function are: src, chan, num, value.

src

The src number may be the system UID (obtained from MIDIClient.sources[index].uid) or the index of the source in the MIDIClient.sources array. nil matches all.

chan

An Integer between 0 and 15 that selects which MIDI channel to match. nil matches all. May also be a Function which will be evaluated to determine the match. eg: { |val| val < 2 }

num

An Integer between 0 and 127 that selects which note number to match. nil matches all. May also be a Function which will be evaluated to determine the match. eg: { |val| val >= 4 }

veloc

An Integer between 0 and 127 to filter values. nil matches all. May also be a Function which will be evaluated to determine the match. eg: { |val| val < 50 }

install

If true, install the responder automatically so it is active and ready to respond. If false, then it will be inactive.

swallowEvent

If true, then if the midi event is matched, cease testing any further responders. Note that doing this will prevent any other responders of this type from responding, including ones added behind the scenes in classes. Note also that this functionality is sensitive to the order in which responders are added.

Inherited class methods

Undocumented class methods

NoteOffResponder.add(resp)

NoteOffResponder.initialized

NoteOffResponder.noffinit

NoteOffResponder.noffr

NoteOffResponder.remove(resp)

NoteOffResponder.responders

Instance Methods

.learn

From superclass: NoteOnResponder

Wait for the next noteOff message, reset self to match src, chan.

Inherited instance methods

Examples