Search in sources :

Example 1 with P1ButtonCommand

use of de.mossgrabers.sl.command.trigger.P1ButtonCommand in project DrivenByMoss by git-moss.

the class SLControllerSetup method registerTriggerCommands.

/**
 * {@inheritDoc}
 */
@Override
protected void registerTriggerCommands() {
    final SLControlSurface surface = this.getSurface();
    for (int i = 0; i < 8; i++) {
        this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW1_1.intValue() + i), SLControlSurface.MKII_BUTTON_ROW1_1 + i, new ButtonRowViewCommand<>(0, i, this.model, surface));
        this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW2_1.intValue() + i), SLControlSurface.MKII_BUTTON_ROW2_1 + i, new ButtonRowViewCommand<>(1, i, this.model, surface));
        this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW3_1.intValue() + i), SLControlSurface.MKII_BUTTON_ROW3_1 + i, new ButtonRowViewCommand<>(2, i, this.model, surface));
        this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW4_1.intValue() + i), SLControlSurface.MKII_BUTTON_ROW4_1 + i, new ButtonRowViewCommand<>(3, i, this.model, surface));
        this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW_SELECT_1.intValue() + i), SLControlSurface.MKII_BUTTON_ROWSEL1 + i, new ButtonRowSelectCommand<>(i, this.model, surface));
    }
    this.addTriggerCommand(Commands.COMMAND_REWIND, SLControlSurface.MKII_BUTTON_REWIND, new ButtonRowViewCommand<>(4, 0, this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_FORWARD, SLControlSurface.MKII_BUTTON_FORWARD, new ButtonRowViewCommand<>(4, 1, this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_STOP, SLControlSurface.MKII_BUTTON_STOP, new ButtonRowViewCommand<>(4, 2, this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_PLAY, SLControlSurface.MKII_BUTTON_PLAY, new ButtonRowViewCommand<>(4, 3, this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_LOOP, SLControlSurface.MKII_BUTTON_LOOP, new ButtonRowViewCommand<>(4, 4, this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_RECORD, SLControlSurface.MKII_BUTTON_RECORD, new ButtonRowViewCommand<>(4, 6, this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_ARROW_LEFT, SLControlSurface.MKII_BUTTON_P1_UP, new P1ButtonCommand(true, this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_ARROW_RIGHT, SLControlSurface.MKII_BUTTON_P1_DOWN, new P1ButtonCommand(false, this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_ARROW_UP, SLControlSurface.MKII_BUTTON_P2_UP, new P2ButtonCommand(true, this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_ARROW_DOWN, SLControlSurface.MKII_BUTTON_P2_DOWN, new P2ButtonCommand(false, this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_SELECT_PLAY_VIEW, SLControlSurface.MKII_BUTTON_TRANSPORT, new TransportButtonCommand(this.model, surface));
}
Also used : TransportButtonCommand(de.mossgrabers.sl.command.trigger.TransportButtonCommand) P1ButtonCommand(de.mossgrabers.sl.command.trigger.P1ButtonCommand) P2ButtonCommand(de.mossgrabers.sl.command.trigger.P2ButtonCommand) SLControlSurface(de.mossgrabers.sl.controller.SLControlSurface)

Aggregations

P1ButtonCommand (de.mossgrabers.sl.command.trigger.P1ButtonCommand)1 P2ButtonCommand (de.mossgrabers.sl.command.trigger.P2ButtonCommand)1 TransportButtonCommand (de.mossgrabers.sl.command.trigger.TransportButtonCommand)1 SLControlSurface (de.mossgrabers.sl.controller.SLControlSurface)1