looking for getChildTracks() on a groupTrack

jaspertm
KVRer
6 posts since 3 Nov, 2019

Post Sun Nov 03, 2019 3:09 am

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:

User avatar
moss
KVRAF
1760 posts since 13 May, 2004

Re: looking for getChildTracks() on a groupTrack

Post Sun Nov 03, 2019 7:04 am

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.

jaspertm
KVRer
6 posts since 3 Nov, 2019

Re: looking for getChildTracks() on a groupTrack

Post Sun Nov 10, 2019 9:27 am

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

Return to “Controller Scripting”