Get, set or clear the midicontrol object callback.
midicontrolObj - control object created using midicontrols.
functionHandle - function handle to set for call back. If it is [], the callback function will be cleared.
NOTE: currently anonymous functions will not work.
NOTE: callbacks should be cleared before losing all references to the midicontrols object.
oldhandle The previously set midicallback function handle when setting a new callback.
currhandle The current set midicallback function handle.
Set a callback on a midicontrols object
ctrl = midicontrols(2001) function dispCallback(ctrl),disp(midiread(ctrl)),endfunction; midicallback(ctrl, @dispCallback);
Clear the callback on a midicontrols object
ctrl = midicontrols(2001) midicallback(ctrl, []);
Get the current callback on a midicontrols object
ctrl = midicontrols(2001) cb = midicallback(ctrl);
See also: midicontrols, midisync, midiread.
Package: audio