Developing with the Bitwig Controller API - Video Tutorial available

RELATED
PRODUCTS

Post

Hey Moss,
thank you for all that helpful explanation! Visited your API course at last Superbooth and this is very good for expanding and refreshing the knowledge! Especially the one about graphics in the Bitwig API. Just drew some first test graphics into the test window. :D
graphicsAPI.JPG
My greater idea is to build a Bitwig controller with OLED displays. ATM, I still think it should be possible to do using an Arduino UNO + an small SPI RGB OLED screen (already tested an they work well together).

The problem is that I couldn't figure out how to send the display data from Bitwig Studio to the Arduino yet. Till now, I had 2 ideas:
  • including the Java-Arduino Communication library into the java project and trying to send pixel data over COM port. But I couldn't figure it out yet.
  • somehow trying to make it work to use the Arduino as a USB device (i don't know too much about that topic but I guess that using the COM port might not be the best solution). Then somehow using the controller API to send the graphics data to that Usb Device.
Which approach is better, you think? Will you do videos about that kind of stuff?

Cheers!
You do not have the required permissions to view the files attached to this post.

Post

u-u-u wrote: Sat Feb 23, 2019 1:40 am The problem is that I couldn't figure out how to send the display data from Bitwig Studio to the Arduino yet. Till now, I had 2 ideas:
Which approach is better, you think? Will you do videos about that kind of stuff?
Interesting idea. Tempts me to buy one myself, but I should keep away from this tinkering stuff, already too much other stuff going on :-)

I am not an expert in this area but some quick research brought up this:
https://electronics.stackexchange.com/q ... ion-method

As far as I understand it serial is currently the only communication option?! I am not sure if it fast enough to transfer display data. The correct architecture might be to only send the data and do the graphics on the Arduino.

Keep me posted!

Post

Thank you, Moss, also for the help concerning my maven problem. Now I got something working but it is pretty slow. I hacked it together and probably the communication can be improved. For now, I send a simple string over the Serial port containing a 3-letter command (like "nam" for showing a name), a seperator + the string to be shown on the display:
ArduinoTrackDisplay (1).jpg
And when I select the other track:
ArduinoTrackDisplay (2).jpg
In total I have two tracks + 1 send + the master track = 4 tracks.
two Tracks.JPG
So as you can see, at least a proof of concept. ;)
You do not have the required permissions to view the files attached to this post.

Post

Nice :-) You can try to increase the baud rate of the serial interface.

Post

Hi,
I'm following your tutorial on the controller API and has reached the Java-tutorials.
I can't get my debugger to connect to bitwig. When I try eclipse just tells me "Failed to connect to remote VM. Connection refused."
I tried different ports and I've checked if they should be occupied.
I also set my enviromental variable BITWIG_DEBUG_PORT both in Terminal, and installed a plugin in eclipse that sets it for me there, to be sure that it sees it. I also added the BITWIG_DEBUG_PORT as an env variable in my run configuration.
I'm on Mac osx catalina, so i know the env variables can be a headache...
Do you have any idea of what I'm doing wrong?
Hope this is the right place for these kinds of questions.
Thank you for your great tutorials!
Anders

Post

I fixed it... turned out it was Bitwig that had to have acces to my environmental variables, and couldn't see my BITWIG_DEBUG_PORT, and therefore didn't open a port. MacOS giving me a headache again...
If anyone sees this and has the same problem, you have to set your environmental variable BITWIG_DEBUG_PORT through terminal, for example in .bash_profile, and then start Bitwig through an Automator script, that executes the following shell command:

source ~/.bash_profile && /Applications/Bitwig Studio.app/Contents/MacOS/BitwigStudio

Hope this helps someone.

Post

andersskibsted wrote: Tue Jul 21, 2020 7:00 pm I fixed it... turned out it was Bitwig that had to have acces to my environmental variables, and couldn't see my BITWIG_DEBUG_PORT, and therefore didn't open a port. MacOS giving me a headache again...
If anyone sees this and has the same problem, you have to set your environmental variable BITWIG_DEBUG_PORT through terminal, for example in .bash_profile, and then start Bitwig through an Automator script, that executes the following shell command:

source ~/.bash_profile && /Applications/Bitwig Studio.app/Contents/MacOS/BitwigStudio

Hope this helps someone.
Also note that Catalina uses zsh instead of bash, which means you need to put the variable in .zprofile instead of .bash_profile.

Post

Hi,
I've been following your tutorials, and I think I'm finally getting the hang of it (...and Java).
I have a question on how you made the 6 byte 14 bit midi support, in the Generic Flexi.
How are you recieving and handling the values coming in? And is it using something else than the hardware API? It doesn't seem to have an object for 14 bit cc midi knobs.
Could you point me in the direction of where in your code your handling it?
I've been looking through drivenbymoss on Github but haven't had any luck so far - that is still a bit out of my league.
Thanks again for all of this valuable material. It has really been a tremendous help.
Anders

Post

andersskibsted wrote: Thu Apr 15, 2021 10:10 pm Hi,
I've been following your tutorials, and I think I'm finally getting the hang of it (...and Java).
I have a question on how you made the 6 byte 14 bit midi support, in the Generic Flexi.
How are you recieving and handling the values coming in? And is it using something else than the hardware API? It doesn't seem to have an object for 14 bit cc midi knobs.
Could you point me in the direction of where in your code your handling it?
I've been looking through drivenbymoss on Github but haven't had any luck so far - that is still a bit out of my league.
Thanks again for all of this valuable material. It has really been a tremendous help.
Anders
The Generic Flexi is a generic mapper and therefore does not use the hardware API. The code you are looking for is in GenericFlexiControlSurface.handleCC

Post

Does the video cover things like what methods are available through the host object?

> println(host)
com.bitwig.flt.control_surface.proxy.BitwigStudioHost@733b8e3a

Clearly host is a thing that you can't just dump.

Post

wpostma wrote: Fri Jun 11, 2021 1:29 am Does the video cover things like what methods are available through the host object?

> println(host)
com.bitwig.flt.control_surface.proxy.BitwigStudioHost@733b8e3a

Clearly host is a thing that you can't just dump.
check the ControllerHost object in the API Reference.
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest

Post

That appears to be only available as a local file and not something we can link to on the web I guess?

Post

wpostma wrote: Fri Jun 11, 2021 4:44 am That appears to be only available as a local file and not something we can link to on the web I guess?
Yes, it is part of the installation.

Post

That was hard to find.

C:\Program Files\Bitwig Studio\4.0.1\resources\doc\control-surface\api\index.html

Post

wpostma wrote: Fri Jul 30, 2021 3:20 am thats a windows path...
Thats a windows path. So its not valid for all users. The way to find it is through the help in the bitwig dashboard.
api reference.png
You do not have the required permissions to view the files attached to this post.
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest

Post Reply

Return to “Controller Scripting”