That sinking feeling that nothing is what it seems like the name means it is.

Post Reply New Topic
RELATED
PRODUCTS

Post

In software development, and computer science (the academic side) they often say that "Naming Things is One of the Hard Problems".

My initial few days of playing around with bitwig scripting and its amorphous and labyrinthine APIs, one wonders who (outside the bitwig core team) can figure out what the difference between these three different ways of launching a clip are, and what integer values mean in the context of any of these objects.

One could rather use a diagram, to sort out what a track, a track bank, a slot, a slot bank, and all these things even are.

Borrowing code from all over because one can't figure it out and then trying to puzzle out the weird results, surely there is a better way.

Code: Select all

// when do you want to directly call this:
trackBank.launchScene(column);

// and when do you want to getChannel and then get clipLauncherSlots and launch from this?        
trackBank.getChannel(row).getClipLauncherSlots().launch(column);
Are the integers going in there really absolute column numbers? Or some relative column based on some offset inherent in the trackBank.

One wonders why the API doesn't have transport.playClipAt(row,column). For the sake of keeping us sane.

Back to reading the shitty Java API DOCS that make NO SENSE. A Channel. What is a Channel. It has something to do with a track. What's a track and what's a track bank. DAW users can Guess what a Track is. It's probably one of those horizontal rows in the daw. Maybe?

Post

i know the feeling man.... but its just a matter of diving deep into the API concepts. Its not an open document model like ableton. its this controller model that is bitwig specific and you have to create many of the objects and observe/mark properties of those during the init().

Dive deep into it here... Moss has done a great job breaking it down.
https://www.youtube.com/watch?v=l4AuiQ8 ... O3luQCFQR2

Careful in the documentation lots of things are depreciated. it needs some work. great to come here and ask questions :)

Some example of what you are trying to do... its Java but you should be able to translate to JavaScript...

init code...

Code: Select all

    
    Signal setting_do_me = host.getDocumentState().getSignalSetting("Do Me", "Status", "Do me");
    setting_do_me.addSignalObserver(this::doMe);


    CursorTrack cursor_track = host.createCursorTrack("cursor track", "cursor track", 5,20, true);
    cursor_track.name().markInterested();

    track_bank = cursor_track.createSiblingsTrackBank(1, 4, 20, true, true);
    Track channel = track_bank.getItemAt(0);
    slot_bank = channel.clipLauncherSlotBank();
and the callback to launch slot...

Code: Select all

  private void doMe() {
    int   rand_int = (int) Math.floor(Math.random() * 4);
    slot_bank.launch(rand_int);
    host.println("slot_bank: " + rand_int);
  }
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest

Post

Thanks! I really appreicate MOSS breaking all this down for us Mere Mortals! :-)

That's over 15 episodes so far and the playlist with them all is linked here

https://www.youtube.com/watch?v=l4AuiQ8 ... 3%9Fgraber

Post

The API is of the less glamorous parts of Bitwig and there are many things to wonder, it's true. Once you get to know it it's not all terrible, though. Ask us questions here or on Discord, we've already gone through the anger phase. :)

I can't tell from your code snippet, but if you are doing it in JS then life does get significantly better with Java.

Post Reply

Return to “Controller Scripting”