use of de.mossgrabers.apc.command.continuous.DeviceKnobRowCommand in project DrivenByMoss by git-moss.
the class APCControllerSetup method registerContinuousCommands.
/**
* {@inheritDoc}
*/
@Override
protected void registerContinuousCommands() {
final APCControlSurface surface = this.getSurface();
final ViewManager viewManager = surface.getViewManager();
this.addContinuousCommand(Commands.CONT_COMMAND_MASTER_KNOB, APCControlSurface.APC_KNOB_MASTER_LEVEL, new MasterFaderAbsoluteCommand<>(this.model, surface));
this.addContinuousCommand(Commands.CONT_COMMAND_PLAY_POSITION, APCControlSurface.APC_KNOB_CUE_LEVEL, new PlayPositionCommand<>(this.model, surface));
this.addContinuousCommand(Commands.CONT_COMMAND_CROSSFADER, APCControlSurface.APC_KNOB_CROSSFADER, new CrossfaderCommand<>(this.model, surface));
for (int i = 0; i < 8; i++) {
final Integer faderCommand = Integer.valueOf(Commands.CONT_COMMAND_FADER1.intValue() + i);
viewManager.registerContinuousCommand(faderCommand, new FaderAbsoluteCommand<>(i, this.model, surface));
surface.assignContinuousCommand(APCControlSurface.APC_KNOB_TRACK_LEVEL, i, faderCommand);
final Integer knobCommand = Integer.valueOf(Commands.CONT_COMMAND_KNOB1.intValue() + i);
viewManager.registerContinuousCommand(knobCommand, new KnobRowModeCommand<>(i, this.model, surface));
surface.assignContinuousCommand(APCControlSurface.APC_KNOB_TRACK_KNOB_1 + i, knobCommand);
final Integer deviceKnobCommand = Integer.valueOf(Commands.CONT_COMMAND_DEVICE_KNOB1.intValue() + i);
viewManager.registerContinuousCommand(deviceKnobCommand, new DeviceKnobRowCommand(i, this.model, surface));
surface.assignContinuousCommand(APCControlSurface.APC_KNOB_DEVICE_KNOB_1 + i, deviceKnobCommand);
}
if (this.isMkII)
this.addContinuousCommand(Commands.CONT_COMMAND_TEMPO, APCControlSurface.APC_KNOB_TEMPO, new TempoCommand<>(this.model, surface));
}
Aggregations