Latest News: Bitwig Updates Bitwig Studio to 5.2
HOWTO: Get started with the Java API in IntelliJ with remote debugging - with images (BWS 2.2)
-
- KVRer
- Topic Starter
- 14 posts since 17 Oct, 2017
I put together a guide on how to create a new project and configure IntelliJ IDEA in a convenient way to get started with developing controller scripts. If you're not using IntelliJ IDEA, then shame on you. Go to https://www.jetbrains.com/idea/download/ and get it.
The guide itself is hosted on my github account: https://github.com/outterback/bitwig-co ... r-tutorial
I've written it around windows, but it should be trivial to configure it for Mac and Linux. If there are any mistakes, or if you have any comments, let me know and I'll take a look!
The guide itself is hosted on my github account: https://github.com/outterback/bitwig-co ... r-tutorial
I've written it around windows, but it should be trivial to configure it for Mac and Linux. If there are any mistakes, or if you have any comments, let me know and I'll take a look!
- KVRist
- 173 posts since 22 May, 2013
-
- KVRer
- 6 posts since 24 Sep, 2020
I've been using your guide many times already, and just found this post and thus a possibility to thank you! I Even made an account just for this.
Thank you for that nice neat guide!
Thank you for that nice neat guide!
- KVRist
- 324 posts since 12 Apr, 2020
Hey man... are you on osx? I'm having difficulty getting maven and the jdk configured. which isn't covered in this guide. What JDK are you using?
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest
-
- KVRer
- 6 posts since 24 Sep, 2020
I'm on Windows, but had difficulties too.
If I remember correctly what did the trick, was installing Java 12 SDK and setting it as the JAVA_HOME Variable on Windows. I don't know whats the equivalent in OSX, and am not 100 % the Second step was necessary.
Then don't forget to select the JAVA 12 SDK in your IDE.
I think after that, also the maven install would stop complaining and just work as it does according to the Guide.
If I remember correctly what did the trick, was installing Java 12 SDK and setting it as the JAVA_HOME Variable on Windows. I don't know whats the equivalent in OSX, and am not 100 % the Second step was necessary.
Then don't forget to select the JAVA 12 SDK in your IDE.
I think after that, also the maven install would stop complaining and just work as it does according to the Guide.
- KVRist
- 324 posts since 12 Apr, 2020
man. its rough out here for us. Glad you figured out the JAVA_HOME thing on windows. its much simpler to set up there than OSX and all the different versions it goes back. wow.
Besides that I got the intellij Idea CE working and debugger connected. I'm wondering if you were able to get the println to output to the Debugger window vs the bitwig console.
Another thing frustrating is if I put any breakpoints in init() and the bitwig console is up it loves to stay the top window and the debugger has locked bitwig process. So it just hangs there... so I'd just prefer to have that stuff right in Intellij.
Also related to that last thing...it would be helpful for a method to restart a script from the IDE. So that the window doesn't stick to the top and obfuscate any debugging/step through. Maybe you have a way for this already JakeXY?
Check the screenshot here...
Besides that I got the intellij Idea CE working and debugger connected. I'm wondering if you were able to get the println to output to the Debugger window vs the bitwig console.
Another thing frustrating is if I put any breakpoints in init() and the bitwig console is up it loves to stay the top window and the debugger has locked bitwig process. So it just hangs there... so I'd just prefer to have that stuff right in Intellij.
Also related to that last thing...it would be helpful for a method to restart a script from the IDE. So that the window doesn't stick to the top and obfuscate any debugging/step through. Maybe you have a way for this already JakeXY?
Check the screenshot here...
You do not have the required permissions to view the files attached to this post.
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest
-
- KVRer
- 6 posts since 24 Sep, 2020
I am modding the DrivenByMoss Script, so for simple Print debugs I was using his show text overlay in Bitwig Functionality.
I have never really tried it with System.out.println, so no Idea, sorry.
You could search his Script for the display Text function (getDisplay.notify()), and copy it. But, as everything in the Script, its not just a Basic command, but some advanced stuff with many abstract wrapper classes and interfaces.., so I could not extract the actual Bitwig API Command for you at first glance.
So I did not really work with the console in Bitwig, and thus have no Wisdom to share .
(if you assign, what ever you wanted to print to a variable at that point , you can see it's value int the debugger Variables View in Intellij of course, maybe that's a sufficient alternative?)
I don't think it's possible to restart the Script from the IDE, but you can just restart it, by restarting your hardware Controller.
Good Luck with the Coding !
I have never really tried it with System.out.println, so no Idea, sorry.
You could search his Script for the display Text function (getDisplay.notify()), and copy it. But, as everything in the Script, its not just a Basic command, but some advanced stuff with many abstract wrapper classes and interfaces.., so I could not extract the actual Bitwig API Command for you at first glance.
So I did not really work with the console in Bitwig, and thus have no Wisdom to share .
(if you assign, what ever you wanted to print to a variable at that point , you can see it's value int the debugger Variables View in Intellij of course, maybe that's a sufficient alternative?)
I don't think it's possible to restart the Script from the IDE, but you can just restart it, by restarting your hardware Controller.
Good Luck with the Coding !
- KVRist
- 324 posts since 12 Apr, 2020
Awesome... Yeah i will just need to adjust myself getting used to the debugger vs prints. One of those things I guess. I've built so many things without a debugger that I'm quite comfortable with adding println, reloading and observing.
Thanks for the tips JakeXY!
Thanks for the tips JakeXY!
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest
- KVRist
- 324 posts since 12 Apr, 2020
oh wanted to add how to add the debug port to bitwig here since that is all that is necessary because intellij handles the JDK download (Although, it was difficult to track down a working version of JDK 12 for bitwig 3.2.
Close Bitwig, Open Terminal,
Then open bitwig again and you should be able to connect with intellij. I'm still researching into how to add this as a permanent thing so i don't have to run it every time I logout/login.
EDIT:Moss and I put some notes in this thread to get the environment variable and paths to maven to work on OSX. viewtopic.php?f=268&t=553031
Close Bitwig, Open Terminal,
Code: Select all
launchctl setenv BITWIG_DEBUG_PORT 5005
EDIT:Moss and I put some notes in this thread to get the environment variable and paths to maven to work on OSX. viewtopic.php?f=268&t=553031
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest
- KVRist
- 324 posts since 12 Apr, 2020
Wow... I'm really enjoying the IntelliJ IDEA CE. Having everything typed, autocompleted and compiled is a dream. I feel that the scripts run and execute way faster, although I don't and will never have timing details... but i'm pretty sure so far that debug output is immediate when refreshing the script instead of taking a sec.
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest
-
- KVRist
- 313 posts since 18 Sep, 2020
And how did you?Kirkwood West wrote: ↑Mon Sep 28, 2020 9:46 pm (Although, it was difficult to track down a working version of JDK 12 for bitwig 3.2.
- KVRAF
- 4145 posts since 13 May, 2004
Actually not that difficultminortom wrote: ↑Sun Oct 04, 2020 11:23 pmAnd how did you?Kirkwood West wrote: ↑Mon Sep 28, 2020 9:46 pm (Although, it was difficult to track down a working version of JDK 12 for bitwig 3.2.
https://adoptopenjdk.net/releases.html? ... nt=hotspot
- KVRist
- 324 posts since 12 Apr, 2020
Yes moss you pointed this one out earlier! but when i downloaded it I could not get it to work on Catalina. There was something strange with it, it wouldn't unpack to a folder. So I ended up using the one from Oracle.
https://www.oracle.com/java/technologie ... loads.html
would be happy to use the other if i could get it working... would like to avoid their fee.
https://www.oracle.com/java/technologie ... loads.html
would be happy to use the other if i could get it working... would like to avoid their fee.
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest
-
- KVRist
- 313 posts since 18 Sep, 2020
Nice! I looked for that one for a while and somehow could not find it, ended up with https://jdk.java.net/archive/. I looked for the wrong reasons (my extension was improperly packaged, I was misreading the stack trace and blaming it on a JDK mismatch).moss wrote: ↑Mon Oct 05, 2020 8:10 am Actually not that difficult
https://adoptopenjdk.net/releases.html? ... nt=hotspot
On OSX that can be installed as easily as
Code: Select all
brew cask install adoptopenjdk12
There is a fee? I can't get past needing to create an account. Oracle can suck it as long as I can avoid them altogether.Kirkwood West wrote: ↑Mon Oct 05, 2020 8:40 am Yes moss you pointed this one out earlier! but when i downloaded it I could not get it to work on Catalina. There was something strange with it, it wouldn't unpack to a folder. So I ended up using the one from Oracle.
https://www.oracle.com/java/technologie ... loads.html
would be happy to use the other if i could get it working... would like to avoid their fee.
UPD I see your other thread now. Somehow when I searched for "jdk" this came up first.
- KVRAF
- 4145 posts since 13 May, 2004