Trigger Bitwig API java actions from PC keyboard

Post Reply New Topic
RELATED
PRODUCTS

Post

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? :neutral:

Post

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? :neutral:
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:
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.

Post

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.
Maybe a dumb question, but is the same thing true of the javascript API implementation?

Thanks.

Post

shaboogen wrote: Thu Jan 30, 2025 11:14 pm
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.
Maybe a dumb question, but is the same thing true of the javascript API implementation?

Thanks.
No. There is no way with JavaScript I am aware of to do this.

Post Reply

Return to “Controller Scripting”