Clip Launcher Index

Post Reply New Topic
RELATED
PRODUCTS

Post

Hi!

I'm trying to get the index of the clip playing within a cursorTrack.clipLauncherSlotBank()
How would I do that? sceneIndex() doesn't work.
I'm fairly unexperienced with Javascript as a whole, maybe I am blind to something obvious...

If anyone has any pointers I'd be very grateful! Thanks!

Post

Old thread i know but I wanted to document here for others. I beleive this is api 12 compatible.

you need to mark it as interested or add an observer. If you go the observer route from there you can store which clip is currently playing for later.

Code: Select all

var trackBank = host.createTrackBank(1, 0, bankSize);
var track = trackBank.getItemAt(0); //First track in bank.
var slotBank = track.clipLauncherSlotBank(); //
slotBank.addIsPlayingObserver(playingStatusChanged);
and the callback

Code: Select all

function playingStatusChanged(slot_index, is_playing){ }
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest

Post Reply

Return to “Controller Scripting”