Clip recording using JavaScript API

Post Reply New Topic
RELATED
PRODUCTS

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
Hi everyone,
I'm dabbling with the Bitwig Controller JavaScript API and can't seem to figure out how to record into a clip slot in the Clip Launcher.
Here is a minimal snippet of what I'm doing:

Code: Select all (#)

function recordClipSlot(trackIndex, slotIndex) {
   var track = trackBank.getItemAt(trackIndex);
   var slot = track.clipLauncherSlotBank().getItemAt(slotIndex);

   println("recordClipSlot(" + trackIndex + ", " + slotIndex + ")");
   slot.record();
}
What this does is setting the focus onto the clip slot, but nothing is recorded unless playback is already running.
The behavior I'd like to get is the same as clicking the record button on a clip slot in the UI -> play count-in and start recording into the clip slot.
I'm clearly missing something, as this is one of the most basic applications you'd expect from a MIDI controller script...
Maybe someone could enlighten me?

Post Reply

Return to “Controller Scripting”