use of de.mossgrabers.mcu.command.trigger.FaderTouchCommand in project DrivenByMoss by git-moss.
the class MCUControllerSetup method registerTriggerCommandsToAllDevices.
/**
* Common track editing - Assignment to all devices
*/
protected void registerTriggerCommandsToAllDevices() {
for (int index = 0; index < this.numMCUDevices; index++) {
final MCUControlSurface surface = this.getSurface(index);
final ViewManager viewManager = surface.getViewManager();
for (int i = 0; i < 8; i++) {
Integer commandID = Integer.valueOf(Commands.COMMAND_ROW_SELECT_1.intValue() + i);
viewManager.registerTriggerCommand(commandID, new SelectCommand(i, this.model, surface));
surface.assignTriggerCommand(MCUControlSurface.MCU_SELECT1 + i, commandID);
commandID = Integer.valueOf(Commands.COMMAND_FADER_TOUCH_1.intValue() + i);
viewManager.registerTriggerCommand(commandID, new FaderTouchCommand(i, this.model, surface));
surface.assignTriggerCommand(MCUControlSurface.MCU_FADER_TOUCH1 + i, commandID);
this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW1_1.intValue() + i), MCUControlSurface.MCU_VSELECT1 + i, new ButtonRowModeCommand<>(0, i, this.model, surface), index);
this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW2_1.intValue() + i), MCUControlSurface.MCU_ARM1 + i, new ButtonRowModeCommand<>(1, i, this.model, surface), index);
this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW3_1.intValue() + i), MCUControlSurface.MCU_SOLO1 + i, new ButtonRowModeCommand<>(2, i, this.model, surface), index);
this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW4_1.intValue() + i), MCUControlSurface.MCU_MUTE1 + i, new ButtonRowModeCommand<>(3, i, this.model, surface), index);
}
viewManager.registerPitchbendCommand(new PitchbendVolumeCommand(this.model, surface));
}
}
Aggregations