Login / Register  0 items | $0.00 NewWhat is KVR? Submit News Advertise

New Java Api - how to use it

whizzl
KVRer
 
9 posts since 14 Jan, 2017

Postby whizzl; Sat Sep 23, 2017 12:20 pm New Java Api - how to use it

I have generated a new Java Project from within bitwig and opened the Project in Eclipse.
However of course I need to include some resources from bitwig otherwise it cannot resolve the imports. Has anyone done this before?
It is nowhere mentioned how to set up a proper project - am I missing something? Apperently this is all assumed to be obvious.
User avatar
moss
KVRian
 
1099 posts since 12 May, 2004

Postby moss; Sun Sep 24, 2017 1:40 am Re: New Java Api - how to use it

To build Java projects Bitwig uses Maven. First install Maven and test if you can build the generated project without an IDE. Open a console in the directory of the test project which contains the pom.xml.
There type: mvn install
For developing in Eclipse you need the Maven plugin (m2e).
Netsu
KVRist
 
144 posts since 31 Oct, 2016, from Wrocław, Poland

Postby Netsu; Sun Sep 24, 2017 2:57 am Re: New Java Api - how to use it

Is there any advantage to using Java over Javascript?
whizzl
KVRer
 
9 posts since 14 Jan, 2017

Postby whizzl; Sun Sep 24, 2017 5:05 am Re: New Java Api - how to use it

moss wrote:To build Java projects Bitwig uses Maven. First install Maven and test if you can build the generated project without an IDE. Open a console in the directory of the test project which contains the pom.xml.
There type: mvn install
For developing in Eclipse you need the Maven plugin (m2e).


This is actually very helpful thanks. I'm under Fedora Linux and the DrivenByMoss extension built fine. When creating a new project from within bitwig it wouldn't compile - I checked the pom.xml and found

Code: Select all
   <dependencies>
      <dependency>
         <groupId>com.bitwig</groupId>
         <artifactId>extension-api</artifactId>
         <version>4</version>
      </dependency>
   </dependencies>


changing <version>4</version> to <version>2</version> helped and it built without error. Maybe this helps someone trying this. I will continue this approach and maybe post some instructions if successful.
User avatar
TeotiGraphix
KVRian
 
1333 posts since 28 Dec, 2012, from Meredith NH

Postby TeotiGraphix; Fri Sep 29, 2017 12:55 pm Re: New Java Api - how to use it

I'm pretty sure this is due to the fact 4 is 2.2 and that is still in beta.

When 2.2 is released, you need version 4 to access the new methods.
Michael Schmalle
http://www.teotigraphix.com
Surfing on sine waves

Maschine4Bitwig - Studio, MK2, MikroMK2, MK1
http://www.teotigraphix.com/bitwig/maschine
User avatar
.maki
KVRAF
 
4274 posts since 21 Jan, 2008, from oO

Postby .maki; Wed Oct 04, 2017 9:42 am Re: New Java Api - how to use it

Netsu wrote:Is there any advantage to using Java over Javascript?


Not too sure, but i think java provides better debugging.
deastman
KVRAF
 
6378 posts since 6 Aug, 2003, from San Francisco Bay Area

Postby deastman; Wed Oct 04, 2017 9:58 am Re: New Java Api - how to use it

I hadn't noticed that BWS now supports Java development! I have no experience with audio DSP, but tons of Java experience. I'll have to dig into this and see what it can do. Thanks for the pointers to help getting the samples to compile. Has anyone had luck compiling it in Eclipse yet?
Incomplete list of my gear: 110V AC to 12V DC 1.5A power supply (+ tip)
User avatar
.maki
KVRAF
 
4274 posts since 21 Jan, 2008, from oO

Postby .maki; Wed Oct 04, 2017 10:04 am Re: New Java Api - how to use it

deastman wrote:I hadn't noticed that BWS now supports Java development! I have no experience with audio DSP, but tons of Java experience. I'll have to dig into this and see what it can do. Thanks for the pointers to help getting the samples to compile. Has anyone had luck compiling it in Eclipse yet?


There is no Audio DSP involved, just the API and MIDI / SysEX.
User avatar
TeotiGraphix
KVRian
 
1333 posts since 28 Dec, 2012, from Meredith NH

Postby TeotiGraphix; Thu Oct 05, 2017 12:17 am Re: New Java Api - how to use it

.maki wrote:
Netsu wrote:Is there any advantage to using Java over Javascript?


Not too sure, but i think java provides better debugging.


Yes, setting breakpoints when Bitwig is running and debugging with full variable, scope and stepping is one reason I am rehashing my Maschine scripts.

It's unbelievably nice.
Michael Schmalle
http://www.teotigraphix.com
Surfing on sine waves

Maschine4Bitwig - Studio, MK2, MikroMK2, MK1
http://www.teotigraphix.com/bitwig/maschine
User avatar
TeotiGraphix
KVRian
 
1333 posts since 28 Dec, 2012, from Meredith NH

Postby TeotiGraphix; Thu Oct 05, 2017 12:20 am Re: New Java Api - how to use it

deastman wrote:Thanks for the pointers to help getting the samples to compile. Has anyone had luck compiling it in Eclipse yet?


As said, this is the Controller API for managing the client surface of the DAW. Compiling is creating a jar that is turned into a .bwextension(renamed). This "jar" is them loaded by Bitwig as a controller extension.

For me, Java is 100% more concrete and compile time checking saved 100's of hours, that is not even with the debugger.
Michael Schmalle
http://www.teotigraphix.com
Surfing on sine waves

Maschine4Bitwig - Studio, MK2, MikroMK2, MK1
http://www.teotigraphix.com/bitwig/maschine
melodylane
KVRer
 
1 post since 8 Oct, 2017

Postby melodylane; Sun Oct 08, 2017 1:22 pm Re: New Java Api - how to use it

Hey everyone! I'm attempting to create an extension for bitwig, but when I compile my project and place the jar (changed to .bwextension) in the extensions folder it is not detected by bitwig. Did anyone else have this problem?

EDIT: I don't know if this makes a difference, but the DrivenByMoss.bwextension has an executable icon on osx while mine has a generic document icon.
deastman
KVRAF
 
6378 posts since 6 Aug, 2003, from San Francisco Bay Area

Postby deastman; Sun Oct 08, 2017 2:10 pm Re: New Java Api - how to use it

TeotiGraphix wrote:
deastman wrote:Thanks for the pointers to help getting the samples to compile. Has anyone had luck compiling it in Eclipse yet?


As said, this is the Controller API for managing the client surface of the DAW. Compiling is creating a jar that is turned into a .bwextension(renamed). This "jar" is them loaded by Bitwig as a controller extension.

For me, Java is 100% more concrete and compile time checking saved 100's of hours, that is not even with the debugger.

Got it. Considering that Push 2 already has great support, there probably isn't a lot I can add. Unless someone desperately needs a custom interface for a Peavey PC-1600. :wink:
Incomplete list of my gear: 110V AC to 12V DC 1.5A power supply (+ tip)

Moderator: Bitwig Mods

Return to Controller Scripting