Search in sources :

Example 1 with RasteredKnobCommand

use of de.mossgrabers.push.command.trigger.RasteredKnobCommand in project DrivenByMoss by git-moss.

the class PushControllerSetup method registerContinuousCommands.

/**
 * {@inheritDoc}
 */
@Override
protected void registerContinuousCommands() {
    final PushControlSurface surface = this.getSurface();
    for (int i = 0; i < 8; i++) this.addContinuousCommand(Integer.valueOf(Commands.CONT_COMMAND_KNOB1.intValue() + i), PushControlSurface.PUSH_KNOB1 + i, new KnobRowModeCommand<>(i, this.model, surface));
    this.addContinuousCommand(Commands.CONT_COMMAND_MASTER_KNOB, PushControlSurface.PUSH_KNOB9, new MasterVolumeCommand<>(this.model, surface));
    this.addContinuousCommand(Commands.CONT_COMMAND_TEMPO, PushControlSurface.PUSH_SMALL_KNOB1, new RasteredKnobCommand(this.model, surface));
    this.addContinuousCommand(Commands.CONT_COMMAND_PLAY_POSITION, PushControlSurface.PUSH_SMALL_KNOB2, new PlayPositionCommand<>(this.model, surface));
    this.addContinuousCommand(Commands.COMMAND_FOOTSWITCH, PushControlSurface.PUSH_FOOTSWITCH2, new FootswitchCommand<>(this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB1_TOUCH, PushControlSurface.PUSH_KNOB1_TOUCH, new KnobRowTouchModeCommand<>(0, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB2_TOUCH, PushControlSurface.PUSH_KNOB2_TOUCH, new KnobRowTouchModeCommand<>(1, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB3_TOUCH, PushControlSurface.PUSH_KNOB3_TOUCH, new KnobRowTouchModeCommand<>(2, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB4_TOUCH, PushControlSurface.PUSH_KNOB4_TOUCH, new KnobRowTouchModeCommand<>(3, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB5_TOUCH, PushControlSurface.PUSH_KNOB5_TOUCH, new KnobRowTouchModeCommand<>(4, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB6_TOUCH, PushControlSurface.PUSH_KNOB6_TOUCH, new KnobRowTouchModeCommand<>(5, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB7_TOUCH, PushControlSurface.PUSH_KNOB7_TOUCH, new KnobRowTouchModeCommand<>(6, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB8_TOUCH, PushControlSurface.PUSH_KNOB8_TOUCH, new KnobRowTouchModeCommand<>(7, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_TEMPO_TOUCH, PushControlSurface.PUSH_SMALL_KNOB1_TOUCH, new SmallKnobTouchCommand(this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_PLAYCURSOR_TOUCH, PushControlSurface.PUSH_SMALL_KNOB2_TOUCH, new SmallKnobTouchCommand(this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_CONFIGURE_PITCHBEND, PushControlSurface.PUSH_RIBBON_TOUCH, new ConfigurePitchbendCommand(this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_MASTERTRACK_TOUCH, PushControlSurface.PUSH_KNOB9_TOUCH, new MastertrackTouchCommand(this.model, surface));
    final ViewManager viewManager = surface.getViewManager();
    viewManager.registerPitchbendCommand(new PitchbendCommand(this.model, surface));
    final PlayView playView = (PlayView) viewManager.getView(Views.VIEW_PLAY);
    playView.registerAftertouchCommand(new AftertouchAbstractPlayViewCommand<>(playView, this.model, surface));
    final PlayView pianoView = (PlayView) viewManager.getView(Views.VIEW_PIANO);
    pianoView.registerAftertouchCommand(new AftertouchAbstractPlayViewCommand<>(pianoView, this.model, surface));
    if (this.host.hasClips()) {
        viewManager.getView(Views.VIEW_SESSION).registerPitchbendCommand(new PitchbendSessionCommand(this.model, surface));
    }
}
Also used : RasteredKnobCommand(de.mossgrabers.push.command.trigger.RasteredKnobCommand) SmallKnobTouchCommand(de.mossgrabers.push.command.continuous.SmallKnobTouchCommand) ViewManager(de.mossgrabers.framework.view.ViewManager) MastertrackTouchCommand(de.mossgrabers.push.command.continuous.MastertrackTouchCommand) PitchbendSessionCommand(de.mossgrabers.push.command.pitchbend.PitchbendSessionCommand) PlayView(de.mossgrabers.push.view.PlayView) ScenePlayView(de.mossgrabers.push.view.ScenePlayView) ConfigurePitchbendCommand(de.mossgrabers.push.command.continuous.ConfigurePitchbendCommand) PitchbendCommand(de.mossgrabers.push.command.pitchbend.PitchbendCommand) ConfigurePitchbendCommand(de.mossgrabers.push.command.continuous.ConfigurePitchbendCommand) PushControlSurface(de.mossgrabers.push.controller.PushControlSurface) KnobRowModeCommand(de.mossgrabers.framework.command.continuous.KnobRowModeCommand)

Aggregations

KnobRowModeCommand (de.mossgrabers.framework.command.continuous.KnobRowModeCommand)1 ViewManager (de.mossgrabers.framework.view.ViewManager)1 ConfigurePitchbendCommand (de.mossgrabers.push.command.continuous.ConfigurePitchbendCommand)1 MastertrackTouchCommand (de.mossgrabers.push.command.continuous.MastertrackTouchCommand)1 SmallKnobTouchCommand (de.mossgrabers.push.command.continuous.SmallKnobTouchCommand)1 PitchbendCommand (de.mossgrabers.push.command.pitchbend.PitchbendCommand)1 PitchbendSessionCommand (de.mossgrabers.push.command.pitchbend.PitchbendSessionCommand)1 RasteredKnobCommand (de.mossgrabers.push.command.trigger.RasteredKnobCommand)1 PushControlSurface (de.mossgrabers.push.controller.PushControlSurface)1 PlayView (de.mossgrabers.push.view.PlayView)1 ScenePlayView (de.mossgrabers.push.view.ScenePlayView)1