2 summary:: allow functions to be registered to respond to MIDI pitchbend events
3 related:: Classes/MIDIFunc, Classes/MIDIdef, Classes/MIDIResponder, Classes/CCResponder
7 note:: As of SC 3.5 link::Classes/MIDIFunc:: and link::Classes/MIDIdef:: are the recommended way of registering for incoming MIDI messages. They are faster, safer, and have more logical argument order than the old MIDI responder classes. The older class MIDIResponder, and its subclasses NoteOnResponder, NoteOffResponder, BendResponder, TouchResponder, CCResponder, and ProgramChangeResponder are maintained for legacy code only.::
14 A link::Classes/Function:: to be evaluated. Arguments passed to the function are: src, chan, value.
17 The src number may be the system UID (obtained from code:: MIDIClient.sources[index].uid ::) or the index of the source in the code:: MIDIClient.sources :: array. nil matches all.
20 An link::Classes/Integer:: between 0 and 15 that selects which MIDI channel to match. nil matches all. May also be a link::Classes/Function:: which will be evaluated to determine the match. eg: { |val| val < 2 }
23 An link::Classes/Integer:: between 0 and 16383 to filter values. nil matches all. May also be a link::Classes/Function:: which will be evaluated to determine the match. eg: { |val| val < 50 }
26 If true, install the responder automatically so it is active and ready to respond. If false, then it will be inactive.
28 argument::swallowEvent
29 If true, then if the midi event is matched, cease testing any further responders.
34 Wait for the next pitch bend message, reset self to match src, chan.
37 c = BendResponder({ |src,chan,value|
38 [src,chan,value].postln;
40 c.learn; // wait for the first bend message
42 BendResponder.removeAll
50 c = BendResponder({ |src,chan,val|
51 [src,chan,val].postln;
64 c = BendResponder({ |src,chan,val|
65 [src,chan,val].postln;
68 (3..6), // only channels 3 - 6