Trigger Bitwig API java actions from PC keyboard
-
- KVRist
- 39 posts since 4 Oct, 2007
Is it possible? I mean one would install a controller script with 0 midi ports, the script would have a callback for a keyboard event which would call API functions to perform the action(s). Wishful thinking, or what? 
- KVRAF
- 4888 posts since 13 May, 2004
Yes and no. Java is running in headless mode with Bitwig which means you have no access to user interface functionality which includes keyboard presses. Solutions to that would be:dungle wrote: Fri Jan 17, 2025 4:06 am Is it possible? I mean one would install a controller script with 0 midi ports, the script would have a callback for a keyboard event which would call API functions to perform the action(s). Wishful thinking, or what?![]()
1. Write or find a C library (should be platform indepenedent) which you could include in your Java extension to get the key presses
2. Involve a separate app which catches the key presses and sends them to a Bitwig Java extension via the network, e.g. use OSC.
-
- KVRist
- 138 posts since 10 May, 2015
Maybe a dumb question, but is the same thing true of the javascript API implementation?moss wrote: Fri Jan 17, 2025 8:45 amYes and no. Java is running in headless mode with Bitwig which means you have no access to user interface functionality which includes keyboard presses. Solutions to that would be:
1. Write or find a C library (should be platform indepenedent) which you could include in your Java extension to get the key presses
2. Involve a separate app which catches the key presses and sends them to a Bitwig Java extension via the network, e.g. use OSC.
Thanks.
- KVRAF
- 4888 posts since 13 May, 2004
No. There is no way with JavaScript I am aware of to do this.shaboogen wrote: Thu Jan 30, 2025 11:14 pmMaybe a dumb question, but is the same thing true of the javascript API implementation?moss wrote: Fri Jan 17, 2025 8:45 amYes and no. Java is running in headless mode with Bitwig which means you have no access to user interface functionality which includes keyboard presses. Solutions to that would be:
1. Write or find a C library (should be platform indepenedent) which you could include in your Java extension to get the key presses
2. Involve a separate app which catches the key presses and sends them to a Bitwig Java extension via the network, e.g. use OSC.
Thanks.
