A manual conversion of the Bitwig Control Surface Scripting API into javascript method stubs complete with JSDoc. If you're working on any controller scripts this should be super helpful to you! Here's the sort of code-completion these stubs will give you...
Bitwig comes bundled with method stubs based on this work as of version 1.0.12. This repository is still up for historical purposes only.
Report any issues you find! Report issues however is easiest for you...
Click "Download Zip" on the right side of this page. Extract to any folder you like.
- Open Preferences -> Javascript -> Libraries -> "Add..."
- Enter a "Name" for this library (Bitwig API)
- Add the "src" folder from the download to the list with the "+" sign and clicking "Attach Directory"
- (OPTIONAL) Disable HTML/HTML5 libraries
Optionally you may want adjust this setting for better code completion
- Open Preferences -> Javascript
- Disable "Weaker type guess for completion"
- Go to Edit -> Preferences -> Languages -> JavaScript
- Add the "src" folder from the download to the list with the "+" sign.
Feel free to try using this in other IDEs/editors and let me know how well it works. WebStorm seems to have the best support right now with full autocompletion and type-hinting. Komodo Edit has support for autocompletion but no type-hinting .. but it's free!
Also, you may be wondering why a copy of the Bitwig Control Surface Scripting API doc files are included with this. It is so that when a new version comes out I can bring in those files and see what has changed. This way I can keep up-to-date with any changes that are made to the API!
- The API documentation doesn't list when parameters are optional as far as I can tell, so I'm going to have to fix those as I find them.
- TeotiGraphix and marvotron for helping out with the enum parts!
- The Bitwig team for actually releasing API documentation with their software! -nudge nudge- come on Ableton...