Intro to Controller Scripting - Bitwig Studio 1.0.x

Post Reply New Topic
RELATED
PRODUCTS

Post

Skepparkranz wrote:Great to hear Tom... Looking forward to it!
A bitwig script for these arturia babies will make them monsters.
Download 1.0.11 and unleash some monsters... ;-)
I'm still working on some niggles but in the short time we had I think the script(s) for the KeyLab 25, 49 and 61 turned out rather nice.
Thanks go to Arturia for the great support! :tu:

Enjoy!!!

Cheers,

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

Post

And those monsters became alive.... Lovely Tom, must be the greatest invention since the Panflute :-).

Do you know if the Arturia Beatstep will join the gang?

Thanks a lot!

Brgds Daniel

Post

It's definitely on the list, but we have to see where it fits in and how to make it the most useful with BWS. To me it looks like one of those controllers that would benefit a lot from the settings for scripts in 1.1, but I didn't try it out myself yet.
So don't hold your breath... ;-)

Cheers,

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

Post

Please Thomas, can you help me with the Faderport:

I made a search on the Internet about the Messages this Controller needs to control his Fader. I found the Information that it has a 10bit resolution fader, which needs two alternating bank select messages: "First 0xB 0x00 vv is sent (MSB) and then 0xB 0x20 vv (LSB)".

I know basic scripting things, but this is a step to high for me. Can you help me to get the motorized fader working, the rest will be peanuts I think.

Thanks!

Post

I haven't worked with a controller with MSB/LSB yet, but in principle you have to save the MSB in onMidi when it arrives into a variable and then combine it with the LSB when that comes in. Together they form the full 10 bit value.
Put printMidi(status, data1, data2); into onMidi as the first thing and see what comes in in the Scripting Console (view menu) when you move the fader...

Cheers,

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

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.
I'm working on some controller automation for a 4x4 grid of pads. Each "column" of pads represents four clips/slots for that track. For the life of me, I cannot get the scene scrolling API to work. At the same time, the almost identical track scrolling API works fine. It's driving me crazy! Am I missing something?

In the following code snippet, on initialization/reload I only see the track events.

Any help is greatly appreciated!

Code: Select all (#)

function init () {
  var tb = host.createTrackBank(4, 4, 4);
  tb.addCanScrollTracksDownObserver(function(canScroll) {
    println('tracks down: ' + canScroll);
  });
  tb.addCanScrollTracksUpObserver(function(canScroll) {
    println('tracks up: ' + canScroll);
  });
  tb.addCanScrollScenesDownObserver(function(canScroll) {
    println('scenes down: ' + canScroll);
  });
  tb.addCanScrollScenesUpObserver(function(canScroll) {
    println('scenes up: ' + canScroll);
  });
  tb.addCanScrollSendsDownObserver(function(canScroll) {
    println('sends down: ' + canScroll);
  });
  tb.addCanScrollSendsUpObserver(function(canScroll) {
    println('sends up: ' + canScroll);
  });

}

Post

asleeper wrote:At the same time, the almost identical track scrolling API works fine. It's driving me crazy! Am I missing something?
No need to bang your head. It is a Bitwig bug.
Same problem exists for CursorDevice.addSelectedPageObserver.

Post

moss wrote:
asleeper wrote:At the same time, the almost identical track scrolling API works fine. It's driving me crazy! Am I missing something?
No need to bang your head. It is a Bitwig bug.
Same problem exists for CursorDevice.addSelectedPageObserver.
Yep, the CanScrollScene is broken, already reported and in the bugtracker.

There also is a problem with addNextParameterPageEnabled.

But I am surprised by the CursorDevice.addSelectedPageObserver problem. I think I am using that in several scripts, it's just working differently than most other observers in that it only gives back a number which represents the index into the list that addPageNamesObserver holds.
Are you sure it's broken? In that case I would have to investigate.

Or are you using it with the "free-standing" host.createCursorDevice (not derived from a cursor track)? That does not always exist, since its more meant for user selection in the GUI as opposed to the primary device of a track which is always defined and works much better for controllers.

I questioned already if those two shouldn't be combined into one that either is selected by the controller or in the GUI.

Cheers,

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

Post

ThomasHelzle wrote:There also is a problem with addNextParameterPageEnabled.
But I am surprised by the CursorDevice.addSelectedPageObserver problem.
I was too quick looking at our code. The addPrevious/NextParameterPageEnabled is the problem. The selected page is used as a workaround.

BTW: I just noticed a problem, not sure if it is reported: If I delete a device and Undo the deletion all of its Panel Mapping are gone.

Post

That undo-one was news to me - I created a ticket for it right away.
The others are highest priority now.

Cheers,

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

Post

Pie_Mage created a BitWiki for Controller Script Developers:
http://bitwiki.pirate-hour.net/
Feel free (and welcome) to create an account and share your knowledge.

For more immediate questions on Controller Scripts you can also use the
IRC chat on freenode.net #bitwig-dev

Thanks Pie_Mage!

Cheers,

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

Post

Alienware 17R4
Windows 10 1803
BWS 2.4

Post

i'm planning to write a launchpad controller script for live/performance use, that's better suited to my own needs, and quite different from the official script..

but..

is there a way to get the color and name of clips?
and tracks?
and scenes?

it would be nice to have the launchpad lights reflect the clip/track/scene colors in various ways.. and also have some pre-defined opcodes or naming scheme for doing various other things..

inspired by:

clyphx and lpc-live

- tor-helge

Post

First: the Launchpad isn't RGB but only has a predefined number of colours (see the script), basically Red, Green and Amber.

But yes, you can get the colours from Bitwig: you create Observers for the colours of clips, and tracks (scenes are not a real "entity" yet in this and other regards, they basically just set the colour of the contained clips which you can (and need to) get individually).

You can also create observers for the Names of these things, although the Launchpad has no way to show these.

Check my tutorial on observers if you didn't already:
http://blog.thomashelzle.de/2014/06/bit ... observers/

Also check the API Reference on "ClipLauncherScenesOrSlots", "ClipLauncherSlots" and "Track" for the name and colour observers.

You may want to create a new thread or join the bitwig-dev IRC channel on freenode.net for more help on the coding side.
There also is the new inofficial BitWiki: http://bitwiki.pirate-hour.net/ with some initial dev-related info.

Cheers,

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

Post

ThomasHelzle wrote:First: the Launchpad isn't RGB but only has a predefined number of colours (see the script), basically Red, Green and Amber.
i know.. i have already done quite a lot of experimenting and programming for the launchpad.. but having just a few different colors, like red, yellow, green, we could set up the clips to get a better overview of the project/song.. especially for live/performances, so i don't have to constantly stare at the screen to see where i am...
ThomasHelzle wrote:But yes, you can get the colours from Bitwig: you create Observers for the colours of clips, and tracks (scenes are not a real "entity" yet in this and other regards, they basically just set the colour of the contained clips which you can (and need to) get individually).
great.. will experiment with this today..
too bad i can't get the name/color of scenes.. my long-term goal/plan/idea is to have a system so that i don't have to look at the laptop screen at all during performances.. i'm a very visual oriented guy, so i always color code everything, and being able to have this mirrored on the launchpad (even if it's very limited) would be cool.. perhaps specific colors to indicate verses/choruses, etc.. i easily get lost in the 8*8 grid of similarly colored buttons :-/
ThomasHelzle wrote:You can also create observers for the Names of these things, although the Launchpad has no way to show these.
i know i can't show the names, but i can parse the name string, see if there are some specific markers/opcodes/letters in the name, and do certain things based on these..
ThomasHelzle wrote:Check my tutorial on observers if you didn't already:
http://blog.thomashelzle.de/2014/06/bit ... observers/
yeah.. i already made my own scripts for lauchpad, edirol pcr-300, and native instruments audio kontrol 1 (usb audio interface that has some programmable buttons/knobs), with a bunch of observers, so i know how it's done.. but the api isn't very well documented, and i didn't know where to start looking for color- and scene-related stuff :-/
ThomasHelzle wrote:Also check the API Reference on "ClipLauncherScenesOrSlots", "ClipLauncherSlots" and "Track" for the name and colour observers.

You may want to create a new thread or join the bitwig-dev IRC channel on freenode.net for more help on the coding side.
There also is the new inofficial BitWiki: http://bitwiki.pirate-hour.net/ with some initial dev-related info.
awesome! thanks..
will check them all out!
and let you know if i come up with something interesting :-)

- tor-helge

Post Reply

Return to “Controller Scripting”