Search in sources :

Example 1 with MainEncoderCommand

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

the class Kontrol1ControllerSetup method registerContinuousCommands.

/**
 * {@inheritDoc}
 */
@Override
protected void registerContinuousCommands() {
    final Kontrol1ControlSurface surface = this.getSurface();
    final IMidiInput input = surface.getMidiInput();
    for (int i = 0; i < 8; i++) {
        final IHwRelativeKnob knob = this.addRelativeKnob(ContinuousID.get(ContinuousID.KNOB1, i), "Knob " + (i + 1), new KnobRowModeCommand<>(i, this.model, surface), Kontrol1ControlSurface.ENCODER_1 + i);
        knob.bindTouch(new KnobRowTouchModeCommand<>(i, this.model, surface), input, BindType.CC, 0, Kontrol1ControlSurface.TOUCH_ENCODER_1 + i);
        knob.setIndexInGroup(i);
    }
    this.addRelativeKnob(ContinuousID.MASTER_KNOB, "Master", new MainEncoderCommand(this.model, surface), Kontrol1ControlSurface.MAIN_ENCODER);
    surface.addPianoKeyboard(25, input, true);
}
Also used : IHwRelativeKnob(de.mossgrabers.framework.controller.hardware.IHwRelativeKnob) Kontrol1ControlSurface(de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1ControlSurface) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) MainEncoderCommand(de.mossgrabers.controller.ni.kontrol.mki.command.continuous.MainEncoderCommand)

Aggregations

MainEncoderCommand (de.mossgrabers.controller.ni.kontrol.mki.command.continuous.MainEncoderCommand)1 Kontrol1ControlSurface (de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1ControlSurface)1 IHwRelativeKnob (de.mossgrabers.framework.controller.hardware.IHwRelativeKnob)1 IMidiInput (de.mossgrabers.framework.daw.midi.IMidiInput)1