use of de.mossgrabers.controller.novation.launchkey.maxi.controller.LaunchkeyMk3Display in project DrivenByMoss by git-moss.
the class LaunchkeyMk3ControllerSetup method createSurface.
/**
* {@inheritDoc}
*/
@Override
protected void createSurface() {
final IMidiAccess midiAccess = this.factory.createMidiAccess();
final IMidiOutput output = midiAccess.createOutput();
// A bit tricky to exclude only channel 16...
final List<String> filters = new ArrayList<>();
for (int i = 0; i < 15; i++) {
filters.add(StringUtils.toHexStr(0x80 + i) + "????");
filters.add(StringUtils.toHexStr(0x90 + i) + "????");
}
final IMidiInput input = midiAccess.createInput("Pads", filters.toArray(new String[filters.size()]));
final IMidiInput inputKeys = midiAccess.createInput(1, "Keyboard", "8?????", /* Note off */
"9?????", /* Note on */
"A?????", /* Polyphonic After-touch */
"B?01??", /* Modulation */
"C?????", /* Program change */
"B?40??", /* Sustain pedal */
"D?????", /* Channel After-touch */
"E?????");
final LaunchkeyMk3ControlSurface surface = new LaunchkeyMk3ControlSurface(this.host, this.colorManager, this.configuration, output, input);
this.surfaces.add(surface);
surface.addTextDisplay(new LaunchkeyMk3Display(this.host, output));
surface.addPianoKeyboard(25, inputKeys, true);
}
Aggregations