Questions about Bitwig Scripting + API Docs?
-
- KVRer
- 4 posts since 13 Apr, 2017
Hi All,
I'm interested in scripting with Bitwig, and have a couple questions related to that:
1) My computer at the moment is too old to install Bitwig, so I don't have access to the scripting guide within the software. Does anybody know if there is API Documentation hosted online anywhere? I want to make an informed decision on whether or not to upgrade my computer + shift from Ableton to Bitwig, and scripting plays a big role in that.
2) Is it possible to send data from Bitwig to other scripts via the API? For example, would it be possible to grab level data from a particular channel and stream that in real time to another location? The two use cases that I'm interested in are streaming level (dB) data to a controller with an LED strip (e.g. KMI's K-Mix), as well as to a Node.js script. Anybody know if either of these are possible with Bitwig scripting?
If anybody knows of any online resources that'll give me a good sense of what's possible with Bitwig scripting - I would highly appreciate that! The Bitwig website seems to be severely lacking with documentation on this front.
Cheers, and hope you all are having lovely days!!
Sami
I'm interested in scripting with Bitwig, and have a couple questions related to that:
1) My computer at the moment is too old to install Bitwig, so I don't have access to the scripting guide within the software. Does anybody know if there is API Documentation hosted online anywhere? I want to make an informed decision on whether or not to upgrade my computer + shift from Ableton to Bitwig, and scripting plays a big role in that.
2) Is it possible to send data from Bitwig to other scripts via the API? For example, would it be possible to grab level data from a particular channel and stream that in real time to another location? The two use cases that I'm interested in are streaming level (dB) data to a controller with an LED strip (e.g. KMI's K-Mix), as well as to a Node.js script. Anybody know if either of these are possible with Bitwig scripting?
If anybody knows of any online resources that'll give me a good sense of what's possible with Bitwig scripting - I would highly appreciate that! The Bitwig website seems to be severely lacking with documentation on this front.
Cheers, and hope you all are having lovely days!!
Sami
-
- KVRist
- 209 posts since 31 Oct, 2016 from Wrocław, Poland
Regarding 2), don't know if that's what you mean, but the scripts you write act as a communication layer between the controller and Bitwig. You can set up a callback function in the script that will be called each time your level (dB) value changes on a given channel (you can do the same with pretty much any value in Bitwig). Then you can do with this value whatever you want, including sending data to your controller with MIDI or SysEx. You can also set up communication via TCP in the script, so you could send it to any other place that is listening on a given port, but I haven't tried that.
Hope that answers your question.
Hope that answers your question.
-
- KVRer
- Topic Starter
- 4 posts since 13 Apr, 2017
@Netsu - yes, that mostly does. My follow up question is as follows: can I run any kind of script that I want within the scripts folder? Do they have to be inherently tied to a controller? Your answer makes it sound like I *can* do that, but I just wanted to clarify this. I'd love to have a script that interfaced with my own server script running elsewhere using websockets without having any connection to a hardware controller. Any idea if that's possible?
-
- KVRist
- 209 posts since 31 Oct, 2016 from Wrocław, Poland
I don't think so. Each script is tied to a specific controller and will not run when the controller is not connected. Maybe with a virtual controller of some sort?
- KVRist
- 207 posts since 23 Oct, 2008
That's wrong. A script doesn't need to define any input or output devices, so it can act in the way the Op intended.Netsu wrote:I don't think so. Each script is tied to a specific controller and will not run when the controller is not connected.
However, as there is no Web API available in the script interpreter, there's no higher protocols like http or websocket. But pure udp or tcp communication will do the job just as fine with a node app.
-
- KVRer
- Topic Starter
- 4 posts since 13 Apr, 2017
@BufoBufo so based off of your response, I'm guessing that when Bitwig is running a script, it will not let you import whatever library you want into the script?
-
- KVRist
- 209 posts since 31 Oct, 2016 from Wrocław, Poland
Oh, sorry, that's good to knowBufoBufo wrote:That's wrong. A script doesn't need to define any input or output devices, so it can act in the way the Op intended.
However, as there is no Web API available in the script interpreter, there's no higher protocols like http or websocket. But pure udp or tcp communication will do the job just as fine with a node app.
- KVRist
- 207 posts since 23 Oct, 2008
Yes it does let you, using the provided load(..) function, but that is limited (a) to local files, (b) loading before the script's entry point (an init function), i.e. no late-loading during runtime, and (c) the imported script must not rely on anything the environment doesn't provide. And the Nashorn environment provides pretty littlethisissami wrote:@BufoBufo so based off of your response, I'm guessing that when Bitwig is running a script, it will not let you import whatever library you want into the script?
-
- KVRer
- Topic Starter
- 4 posts since 13 Apr, 2017
Ok understood! Thanks for the clarification & quick responses BufoBufo & Netsu.
Now... if anybody knows where I can find some API documentation to take a look at, that would be incredible. I've shot the tech support an email asking them if they can share the documentation with me somehow, and I'm hopeful they send something my way soon.
Now... if anybody knows where I can find some API documentation to take a look at, that would be incredible. I've shot the tech support an email asking them if they can share the documentation with me somehow, and I'm hopeful they send something my way soon.
- KVRAF
- 4897 posts since 13 May, 2004
Simply install any of the demos. You do NOT have to run the demo. You can find the documentation e.g. on Windows in C:\Program Files\Bitwig Studio\resources\doc\control-surface\apithisissami wrote:Now... if anybody knows where I can find some API documentation to take a look at, that would be incredible. I've shot the tech support an email asking them if they can share the documentation with me somehow, and I'm hopeful they send something my way soon.
Open the index.html in any browser.
