Use a keyboard shortcut to trigger a function in a script

Post Reply New Topic
RELATED
PRODUCTS

Post

Hey.. does anyone know a simple way to have a java script function be triggered by a keyboard shortcut in bitwig.. for example 'SHIFT+CONTROL+"D"

I was trying to figure out if there's some way to have an observer notify the script that a key combination has been pressed or something.. I may be missing something obvious, I couldn't find anything in the API documentation

Post

Edrec wrote: Fri Nov 08, 2019 3:18 am Hey.. does anyone know a simple way to have a java script function be triggered by a keyboard shortcut in bitwig.. for example 'SHIFT+CONTROL+"D"

I was trying to figure out if there's some way to have an observer notify the script that a key combination has been pressed or something.. I may be missing something obvious, I couldn't find anything in the API documentation
No, that is currently not possible.

Post

Ah I thought that would be the case.. would be a nice feature to be added to the API :)

I saw there is now some basic image rendering into a window available in the latest API version.. maybe we will be able to create simple GUIs for custom scripts that can manipulate note data, perform custom functions etc..

Post

Edrec wrote: Mon Nov 11, 2019 1:28 am I saw there is now some basic image rendering into a window available in the latest API version.. maybe we will be able to create simple GUIs for custom scripts that can manipulate note data, perform custom functions etc..
The intention of this is only for supporting graphics displays of controllers. The window is only intended for debugging. Proper GUI support will hopefully come in the future.

Post

I think you are better served using the hotkeys editor inside bitwig, there a lot of actions you can map to...

Post

Can you explain why this is not possible?
If stuff can be triggered from hardware, why isnt is possible to trigger it with "emulated" hardware for example? There must be some workaround to do this maybe?

For example I saw its possible to insert notes in a clip from a hardware controller at specific 16th note (sequencer style workflow was shown), so this must somehow be possible with keyboard shortcuts (and some hacking) I was hoping?

Post

All scripts talk to an API (application programming interface). You can only access whats in the API. But feel free to send a feature request to support@bitwig.com, they might add this in future versions. But I would rather have something like an accessible trigger in the keyboard shortcuts list, or there would be the danger of a clash between the two... (check if the function you want is already listed, the keyboard shortcut list is a bit like the script for the keyboard anyway...)

Post

> accessible trigger in the keyboard shortcuts list

Yes this would be ideal I think, maybe a bank of 8 keyboard shortcuts in the shortcut list, that could be 'observed' from within a script.

Post

Anyone know whether this has been added since the original post? :pray:

Post

Maybe something like Div's midi utils could help out here? obviously kind of a hack, but could work. I'm still working on getting my own script (that's a simpler version of what Moss is doing) working, but i've been meaning to look into something like this too.

I'll try to report back here if I get to doing this. I'm keen to hear if anyone's trying this.

Post Reply

Return to “Controller Scripting”