looking for getChildTracks() on a groupTrack

Post Reply New Topic
RELATED
PRODUCTS

Post

Hello I'm trying to build a sort of a looper for bitwig.

I'm thinking of using a cursor track as a grouptrack, pin it in bitwig, put the child track in a array and start to work with it to build a looper (each track represent one level of overdub). For me, it seems to be an elegant and simple solution. :ud:

There is a function isGroup() to know if a track contains child tracks. but i can't find something like getChildTracks() that return a trackbank or an array of track, etc.

Do you know if i can find something that let me work like this ? or i have to plane the setup differently ? :help:

Post

One of the open issues of the API. :(
You can only navigate the hierarchy (selectFirstChild,selectParent) but not list it.

But instead you can point the trackbank to the child track (selectFirstChild) and monitor and add the child tracks as necessary.

Post

Thank you Moss
I ended up with this solution :

this.cursorTrack = host.createCursorTrack ("LOOPER_CURSOR_TRACK", "LOOPER GroupTrack", 0, 0, true);
this.trackbank = this.cursorTrack.createMainTrackBank(64,0,8,false);
this.trackbank.channelCount().markInterested();

and in the observer of the isPinned value :
this.cursorTrack.isPinned().addValueObserver(doObject(this,cursorTrackPinned));

I resize the bank : this.trackbank.setSizeOfBank(this.trackbank.channelCount().get());

Here the resulting script : https://github.com/solinas3000/Looper4BitwigScript

Post Reply

Return to “Controller Scripting”