This library can be used to access a Novation Launchpad from a java application.
You can directly use it from maven central:
<dependency>
<groupId>org.rjung.util</groupId>
<artifactId>launchpad</artifactId>
<version>1.0</version>
</dependency>
To send colors the the launchpad, the methods set(pad, color)
:
launchpad.set(Pad.A4, Color.RED);
launchpad.set(Pad.find(3, 1), Color.GREEN);
To retrieve messages, implement a LaunchpadReceiver and register it to the launchpad instance. The LaunchpadReceiver will now be called always, when a Command is received.
new Launchpad(new LaunchpadHandler() {
public void recieve(MidiCommand command) {
System.out.println(command);
}
});
There's also a rewritten version of the Games of Life in the branch life.
The build uses maven. You don't need to install anything besides a java 8 development kit (jdk8). Now just run:
./mvn clean package
The build jar can be found in the target
-folder.