Recording a clip into the currently selected track's currently selected launcher slot.

KVRist
56 posts since 21 Nov, 2018

Post Thu Jul 29, 2021 8:01 pm

I am working on a guitar looping foot pedal integration around a Line6 POD XT footswitch's midi out which sends a mix of program control and CC messages.

I have lots of it working. I'm now trying to get it to record and play various clips in the clip launcher.

In the launchpad scripts I think this might be the thing I need to "borrow":

Code: Select all

 
        track = 1;
        scene = 1;
       trackBank = host.createTrackBankSection(8, 4, 99);     // 8 tracks, 4 sends, 99 scenes.   
        trackBank.getTrack(track).getClipLauncher().record(scene);
Also tried cursor track variant

Code: Select all

  cursorTrack = host.createCursorTrack(3, 8);
 cursorTrack.getClipLauncher().record(1);
No joy.

Above is just trying to start the first track and first scene. Which thing has focus is a second step after I figure out how to get a clip to actually start recording ANYWHERE on the clip launcher grid.

Above code quietly does nothing. if this is NOT how I need to get a clip recording, how do I do it?
Note that my project is ready to record and if I click the clip record button on the screen, clips record. I tried zero based track and scene numbering and 1 based, and tried several other values (0,1,2,3). No error comes back from the above. But nothing happens.

EDIT: If I record clips manually (as a user, not from the script) before calling record() then it starts recording (replacing the previous clip). Why that is, I could not tell.



[ I am using bitwig 4.0.1, and I note that the scripting guide PDF has been unceremoniously dropped without updating it, so anyone looking for the scripting GUIDE PDF better grab a pdf copy. ]
You do not have the required permissions to view the files attached to this post.

KVRist

Topic Starter

56 posts since 21 Nov, 2018

Post Thu Jul 29, 2021 9:21 pm

Found a way.

1. Change from ancient api level 1 to 14.
2. call the track method to create a new clip and record.

cursorTrack.recordNewLauncherClip (activescene);


Anyone curious about my progress on the line6 podxt or my beatstep pro custom work can follow along on github here.


https://github.com/wpostma/bitwig-controller-scripting

The goal is to create something like a super "Boss Looper Pedal" inside Bitwig, with all the power of Bitwig's scripting and its built in devices and toys. Song sections can be built and then played in one of the tracks, then scenes to go with the song sections can be built in additional tracks.

I also want to make it possible to set markers and record without using launcher clips at all, that is to say, using the arranger and some deft navigation to build songs without ever putting your guitar down.

Return to “Controller Scripting”