Search in sources :

Example 1 with PitchbendVolumeCommand

use of de.mossgrabers.mcu.command.pitchbend.PitchbendVolumeCommand 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));
    }
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) FaderTouchCommand(de.mossgrabers.mcu.command.trigger.FaderTouchCommand) PitchbendVolumeCommand(de.mossgrabers.mcu.command.pitchbend.PitchbendVolumeCommand) ModeSelectCommand(de.mossgrabers.framework.command.trigger.ModeSelectCommand) SendSelectCommand(de.mossgrabers.mcu.command.trigger.SendSelectCommand) SelectCommand(de.mossgrabers.mcu.command.trigger.SelectCommand) MCUControlSurface(de.mossgrabers.mcu.controller.MCUControlSurface)

Aggregations

ModeSelectCommand (de.mossgrabers.framework.command.trigger.ModeSelectCommand)1 ViewManager (de.mossgrabers.framework.view.ViewManager)1 PitchbendVolumeCommand (de.mossgrabers.mcu.command.pitchbend.PitchbendVolumeCommand)1 FaderTouchCommand (de.mossgrabers.mcu.command.trigger.FaderTouchCommand)1 SelectCommand (de.mossgrabers.mcu.command.trigger.SelectCommand)1 SendSelectCommand (de.mossgrabers.mcu.command.trigger.SendSelectCommand)1 MCUControlSurface (de.mossgrabers.mcu.controller.MCUControlSurface)1