Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: *​midi-debug​* , Previous: *​midi-cc-state​* , Up: M , Home: Overview

Clamps Dictionary

midi-controller

Class

Generic base class for midi controllers in the cl-midictl package. An instance of a class derived from midi-controller should get initialized with add-midi-controller and removed with remove-midi-controller in order to add/remove it to/from the midi controller registry.

midi-controller implements the following slots with initargs being the keywords of the slot symbol:

cc-map – Array mapping CC nums to internal indexes of the instance.

cc-fns – Array of 128 lists storing functions to call when receiving a value at any of the 128 CC numbers.

cc-state – Array of 128 ref-objects storing the last received CC value for each CC number.

chan – Integer in the range [1..16] denoting the MIDI channel.

echo – Boolean to en/disable echoing of midi input to midi output.

id – Keyword or Symbol to identify the controller in the registry.

last-note-on – The keynum of the last received note-on event with positive velocity.

midi-input – jackmidi:input-stream for MIDI input.

midi-output – jackmidi:output-stream for MIDI output.

note-fns – Array of 128 lists storing functions to call with the velocity as argument, mapped to a received note-on event on any of the 128 keynumbers.

note-state – Array of 128 ref-objects storing the last received velocity for each keynum.

unwatch – Storage for unwatch functions for the slots of the controller instance, handled internally.

Author: Orm Finnendahl

Created: 2025-02-18 Di 12:58

Validate