Content Observer

Post Reply New Topic
RELATED
PRODUCTS

Post

Hi!

I am trying to understand how to deal with observers, specifically to observe and access the state of clips in the launcher.
In the init function I use:

cursorTrack.clipLauncherSlotBank().addHasContentObserver(function (slotindex, hasContent) {
println (hasContent ? "clip present" : "empty");
println (slotindex);
});

This prints the state of the slots into the console just fine and registers any change, so I think I'm on the right track.
My quarrel now is to access the observer later in the script. Specifically, in the onMidi function I want to check for a free slot to launch upon arrival of a MIDI message.
Any ideas on what would be the way to go about this, or a resource an absolute beginner could look into for this?

Post Reply

Return to “Controller Scripting”