Description:
TrackBank duplicates any effect and master tracks at the top level when there are group tracks open, and does so for each group track open.
Steps to reproduce:
1. Make a controller script that uses
Code: Select all
ControllerHost.createTrackBank(numTracks, numSends, numScenes)Code: Select all
let bank = host.createTrackBank(8, 0, 0);
function onTrackChange() {
host.println(`Bank size: ${bank.getSize()}`);
for(int i = 0; i < 8; i++) {
let track = bank.getItemAt(i);
host.println(`Track ${i}: ${track.name().get()}`);
}
}
for(int i = 0; i < 8; i++) {
let track = bank.getItemAt(i);
track.exists().addValueObserver(onTrackChange);
track.name().addValueObserver(onTrackChange);
}
Your bank should only have a size of 3.
3. Open the group track. Your bank will mystically have a size of 5 now, with no tracks created!
4. Add another effect track. Your bank will now have a whopping 7 tracks now, but your document only has 4 tracks?
5. Rename one of the effect tracks. You will see that *two* of the bank tracks change their name.
Expected behavior:
I wasn't expecting the tracks to duplicate when the group track is opened. I have to use createTrackBank to get a nice list of all the tracks together (audio, instrument, hybrid, effect, group, and master), as no other bank function puts all of them together in one bank, other than this one.
Bitwig Version: Bitwig 3.2.8 (API 12)
OS: Windows 10 (but this might be a cross-platform problem)
