Search in sources :

Example 1 with Kontrol1UsbDevice

use of de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1UsbDevice in project DrivenByMoss by git-moss.

the class Kontrol1ControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final Kontrol1UsbDevice usbDevice = new Kontrol1UsbDevice(this.modelIndex, this.host);
    usbDevice.init();
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    final IMidiInput input = midiAccess.createInput("Komplete Kontrol 1", "80????", /* Note off */
    "90????", /* Note on */
    "B040??", "B001??", /* Sustain pedal + Modulation */
    "D0????", /* Channel After-touch */
    "E0????");
    final Kontrol1ControlSurface surface = new Kontrol1ControlSurface(this.host, this.colorManager, this.configuration, input, usbDevice);
    usbDevice.setCallback(surface);
    this.surfaces.add(surface);
    final Kontrol1Display display = new Kontrol1Display(this.host, this.valueChanger.getUpperBound(), this.configuration, usbDevice);
    surface.addTextDisplay(display);
    surface.getModeManager().setDefaultID(Modes.TRACK);
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) Kontrol1Display(de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1Display) Kontrol1ControlSurface(de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1ControlSurface) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) Kontrol1UsbDevice(de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1UsbDevice)

Aggregations

Kontrol1ControlSurface (de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1ControlSurface)1 Kontrol1Display (de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1Display)1 Kontrol1UsbDevice (de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1UsbDevice)1 IMidiAccess (de.mossgrabers.framework.daw.midi.IMidiAccess)1 IMidiInput (de.mossgrabers.framework.daw.midi.IMidiInput)1