use of de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIILightGuide in project DrivenByMoss by git-moss.
the class SLMkIIIControllerSetup method createSurface.
/**
* {@inheritDoc}
*/
@Override
protected void createSurface() {
final IMidiAccess midiAccess = this.factory.createMidiAccess();
final IMidiOutput output = midiAccess.createOutput();
final IMidiInput keyboardInput = midiAccess.createInput(1, "Keyboard", "8?????", "9?????", "B?????", "D?????", "E?????");
final IHost hostProxy = this.model.getHost();
final IMidiInput input = midiAccess.createInput("Pads", "8?????", "9?????");
final SLMkIIILightGuide lightGuide = new SLMkIIILightGuide(this.model, this.colorManager, output);
final SLMkIIIControlSurface surface = new SLMkIIIControlSurface(hostProxy, this.colorManager, this.configuration, output, input, lightGuide);
this.surfaces.add(surface);
surface.addPianoKeyboard(61, keyboardInput, true);
keyboardInput.setMidiCallback((status, data1, data2) -> {
final int code = status & 0xF0;
if (code == 0x80 || code == 0x90)
lightGuide.updateKeyboardNote(data1, data2);
});
}
Aggregations