Problem to create Trackbanks

Post Reply New Topic
RELATED
PRODUCTS
Bitwig Studio 5

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.
Hello there

well i´m relativly new to Bitwig but coming from Ableton Live so Bitwig looks quite familiar. Anyway I am creating a MIDI Foot Controller as an upcoming crowfunding project. It shall support Ableton Live and Bitwig. I allready created a working controller script for Live which took me nearly two month till I got everything I wanted and now I started the script creation for Bitwig.

I want that every new preset which I create starts with the following configuration: There will be 4 Audiotracks with 4 scenes. The first track should be armed. In Live this works very well if you add your controller in the settings. So, after looking into the Bitwig API I tried the following:

Code: Select all (#)

loadAPI(1);

host.defineController("Frido", "Frido", "1.0", "a044f430-363c-11e6-bdf4-0800200c9a66");
host.defineMidiPorts(1, 1);
host.addDeviceNameBasedDiscoveryPair(["LoopBe Internal MIDI"], ["LoopBe Internal MIDI"]);


function init()
{
    host.createTrackBank(4,0,4);
    host.showPopupNotification(":::160629 - V2::: Bitwig + Frido = Ready For Rock n Rolling");
    println("Hello Frido");
}

I thought that "host.createTrackBank(4,0,4);" should change my session in showing 4 additional tracks + scenes but that doesnt work. The script doesn´t add any tracks inside of the Bitwig session but the popup notification I wrote will be displayed. Also there are no errors in the Log. Is it because im using the demo where I can´t save anything or did I understand something wrong when it comes to track-creation?

Many greetings
Johannes

Post

Okay i figured out that it hasn´t to do anything whether using a demo version or the full version of Bitwig. Is it even possible to change the mixer view with the controller scripts? For example to start a new session with specific named tracks. there are no tutorials or mentions about this but it looks like the API should be capable of this. Also another strange thing is the following. I added the lines in the init-function:

transport = new Transport();
transport.play();

I assumed that when I load my script into Bitwig that every new session would activate the play button in the transport session but this also doesn´t happen. can please anyone help me with this?

Post

Creating a track bank only create an access-structure to existing tracks etc. Everything else would be very bad actually, since for instance a Launchpad with it's 8x8 pads would by your logic create 8 tracks and 8 scenes when connected...
A trackbank is a "window" into your existing tracks - no matter how many.

Creating tracks and scenes can be done with the API but it has nothing to do with the bank concept.

If you are sure you know what you are doing, you should look at the application.createInstrumentTrack(0); etc. functions.
But you need to make sure to check the project for existing tracks etc. otherwise you could destroy the users work (or add unwanted stuff). Doing things like this fully automatic can annoy the hell out of musicians...
You also need to check if your tracks are there already to prevent adding them each time the same project is opened.

The demo has no limitations when it comes to the API.

To set track names check the Track docs:
void setName (String name)

Your second problem is because your code is wrong: transport = host.createTransport();
I'm not sure if you can start play in the init function - never tried, so I'm not sure if your scheme would work at all and if it would work like you expect. Doing something like this could also annoy the hell out of your users...

I can recommend looking at some existing scripts to learn and dig some deeper into the Control Surface Scripting API that comes with bitwig to see what's there...

Cheers,

Tom
"Out beyond the ideas of wrongdoing and rightdoing, there is a field. I’ll meet you there." - Rumi
ScreenDream Instagram Mastodon

Post Reply

Return to “Controller Scripting”