Search in sources :

Example 1 with RecordArmCommand

use of de.mossgrabers.launchpad.command.trigger.RecordArmCommand in project DrivenByMoss by git-moss.

the class LaunchpadControllerSetup method registerTriggerCommands.

/**
 * {@inheritDoc}
 */
@Override
protected void registerTriggerCommands() {
    final LaunchpadControlSurface surface = this.getSurface();
    final ViewManager viewManager = surface.getViewManager();
    viewManager.registerTriggerCommand(Commands.COMMAND_SHIFT, new ShiftCommand(this.model, surface));
    surface.assignTriggerCommand(LaunchpadControlSurface.LAUNCHPAD_BUTTON_SHIFT, Commands.COMMAND_SHIFT);
    surface.assignTriggerCommand(LaunchpadControlSurface.LAUNCHPAD_MKII_BUTTON_USER, Commands.COMMAND_SHIFT);
    this.addTriggerCommand(Commands.COMMAND_METRONOME, LaunchpadControlSurface.LAUNCHPAD_BUTTON_CLICK, new ClickCommand(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_UNDO, LaunchpadControlSurface.LAUNCHPAD_BUTTON_UNDO, new UndoCommand<>(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_DELETE, LaunchpadControlSurface.LAUNCHPAD_BUTTON_DELETE, new DeleteCommand<>(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_QUANTIZE, LaunchpadControlSurface.LAUNCHPAD_BUTTON_QUANTIZE, new QuantizeCommand<>(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_DUPLICATE, LaunchpadControlSurface.LAUNCHPAD_BUTTON_DUPLICATE, new ToggleLoopCommand<>(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_DOUBLE, LaunchpadControlSurface.LAUNCHPAD_BUTTON_DOUBLE, new DoubleCommand(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_RECORD, LaunchpadControlSurface.LAUNCHPAD_BUTTON_RECORD, new RecordCommand<>(this.model, surface));
    viewManager.registerTriggerCommand(Commands.COMMAND_PLAY, new PlayCommand<>(this.model, surface));
    viewManager.registerTriggerCommand(Commands.COMMAND_NEW, new NewCommand<>(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_SELECT_SESSION_VIEW, surface.getSessionButton(), new SelectSessionViewCommand(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_SELECT_PLAY_VIEW, surface.getNoteButton(), new SelectNoteViewCommand(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_DEVICE, surface.getDeviceButton(), new SelectDeviceViewCommand(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_REC_ARM, LaunchpadControlSurface.LAUNCHPAD_BUTTON_REC_ARM, new RecordArmCommand(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_TRACK, LaunchpadControlSurface.LAUNCHPAD_BUTTON_TRACK, new TrackSelectCommand(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_MUTE, LaunchpadControlSurface.LAUNCHPAD_BUTTON_MUTE, new MuteCommand(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_SOLO, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SOLO, new SoloCommand(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_VOLUME, LaunchpadControlSurface.LAUNCHPAD_BUTTON_VOLUME, new VolumeCommand(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_PAN_SEND, LaunchpadControlSurface.LAUNCHPAD_BUTTON_PAN, new PanCommand(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_SENDS, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SENDS, new SendsCommand(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_STOP_CLIP, LaunchpadControlSurface.LAUNCHPAD_BUTTON_STOP_CLIP, new StopClipCommand(this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_ARROW_DOWN, surface.getDownButtonId(), new LaunchpadCursorCommand(Direction.DOWN, this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_ARROW_UP, surface.getUpButtonId(), new LaunchpadCursorCommand(Direction.UP, this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_ARROW_LEFT, surface.getLeftButtonId(), new LaunchpadCursorCommand(Direction.LEFT, this.model, surface));
    this.addTriggerCommand(Commands.COMMAND_ARROW_RIGHT, surface.getRightButtonId(), new LaunchpadCursorCommand(Direction.RIGHT, this.model, surface));
    if (this.isPro) {
        this.addTriggerCommand(Commands.COMMAND_SCENE1, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE1, new LPSceneCommand(7, this.model, surface));
        this.addTriggerCommand(Commands.COMMAND_SCENE2, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE2, new LPSceneCommand(6, this.model, surface));
        this.addTriggerCommand(Commands.COMMAND_SCENE3, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE3, new LPSceneCommand(5, this.model, surface));
        this.addTriggerCommand(Commands.COMMAND_SCENE4, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE4, new LPSceneCommand(4, this.model, surface));
        this.addTriggerCommand(Commands.COMMAND_SCENE5, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE5, new LPSceneCommand(3, this.model, surface));
        this.addTriggerCommand(Commands.COMMAND_SCENE6, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE6, new LPSceneCommand(2, this.model, surface));
        this.addTriggerCommand(Commands.COMMAND_SCENE7, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE7, new LPSceneCommand(1, this.model, surface));
        this.addTriggerCommand(Commands.COMMAND_SCENE8, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE8, new LPSceneCommand(0, this.model, surface));
    } else {
        this.addNoteCommand(Commands.COMMAND_SCENE1, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE1, new LPSceneCommand(7, this.model, surface));
        this.addNoteCommand(Commands.COMMAND_SCENE2, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE2, new LPSceneCommand(6, this.model, surface));
        this.addNoteCommand(Commands.COMMAND_SCENE3, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE3, new LPSceneCommand(5, this.model, surface));
        this.addNoteCommand(Commands.COMMAND_SCENE4, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE4, new LPSceneCommand(4, this.model, surface));
        this.addNoteCommand(Commands.COMMAND_SCENE5, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE5, new LPSceneCommand(3, this.model, surface));
        this.addNoteCommand(Commands.COMMAND_SCENE6, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE6, new LPSceneCommand(2, this.model, surface));
        this.addNoteCommand(Commands.COMMAND_SCENE7, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE7, new LPSceneCommand(1, this.model, surface));
        this.addNoteCommand(Commands.COMMAND_SCENE8, LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE8, new LPSceneCommand(0, this.model, surface));
    }
}
Also used : ShiftCommand(de.mossgrabers.launchpad.command.trigger.ShiftCommand) MuteCommand(de.mossgrabers.launchpad.command.trigger.MuteCommand) ViewManager(de.mossgrabers.framework.view.ViewManager) SelectDeviceViewCommand(de.mossgrabers.launchpad.command.trigger.SelectDeviceViewCommand) RecordArmCommand(de.mossgrabers.launchpad.command.trigger.RecordArmCommand) ClickCommand(de.mossgrabers.launchpad.command.trigger.ClickCommand) SelectSessionViewCommand(de.mossgrabers.launchpad.command.trigger.SelectSessionViewCommand) PanCommand(de.mossgrabers.launchpad.command.trigger.PanCommand) DoubleCommand(de.mossgrabers.launchpad.command.trigger.DoubleCommand) SoloCommand(de.mossgrabers.launchpad.command.trigger.SoloCommand) VolumeCommand(de.mossgrabers.launchpad.command.trigger.VolumeCommand) SendsCommand(de.mossgrabers.launchpad.command.trigger.SendsCommand) LPSceneCommand(de.mossgrabers.launchpad.command.trigger.LPSceneCommand) StopClipCommand(de.mossgrabers.launchpad.command.trigger.StopClipCommand) LaunchpadControlSurface(de.mossgrabers.launchpad.controller.LaunchpadControlSurface) LaunchpadCursorCommand(de.mossgrabers.launchpad.command.trigger.LaunchpadCursorCommand) SelectNoteViewCommand(de.mossgrabers.launchpad.command.trigger.SelectNoteViewCommand) TrackSelectCommand(de.mossgrabers.launchpad.command.trigger.TrackSelectCommand)

Aggregations

ViewManager (de.mossgrabers.framework.view.ViewManager)1 ClickCommand (de.mossgrabers.launchpad.command.trigger.ClickCommand)1 DoubleCommand (de.mossgrabers.launchpad.command.trigger.DoubleCommand)1 LPSceneCommand (de.mossgrabers.launchpad.command.trigger.LPSceneCommand)1 LaunchpadCursorCommand (de.mossgrabers.launchpad.command.trigger.LaunchpadCursorCommand)1 MuteCommand (de.mossgrabers.launchpad.command.trigger.MuteCommand)1 PanCommand (de.mossgrabers.launchpad.command.trigger.PanCommand)1 RecordArmCommand (de.mossgrabers.launchpad.command.trigger.RecordArmCommand)1 SelectDeviceViewCommand (de.mossgrabers.launchpad.command.trigger.SelectDeviceViewCommand)1 SelectNoteViewCommand (de.mossgrabers.launchpad.command.trigger.SelectNoteViewCommand)1 SelectSessionViewCommand (de.mossgrabers.launchpad.command.trigger.SelectSessionViewCommand)1 SendsCommand (de.mossgrabers.launchpad.command.trigger.SendsCommand)1 ShiftCommand (de.mossgrabers.launchpad.command.trigger.ShiftCommand)1 SoloCommand (de.mossgrabers.launchpad.command.trigger.SoloCommand)1 StopClipCommand (de.mossgrabers.launchpad.command.trigger.StopClipCommand)1 TrackSelectCommand (de.mossgrabers.launchpad.command.trigger.TrackSelectCommand)1 VolumeCommand (de.mossgrabers.launchpad.command.trigger.VolumeCommand)1 LaunchpadControlSurface (de.mossgrabers.launchpad.controller.LaunchpadControlSurface)1