Search in sources :

Example 1 with KnobRowViewCommand

use of de.mossgrabers.beatstep.command.continuous.KnobRowViewCommand in project DrivenByMoss by git-moss.

the class BeatstepControllerSetup method registerContinuousCommands.

/**
 * {@inheritDoc}
 */
@Override
protected void registerContinuousCommands() {
    final BeatstepControlSurface surface = this.getSurface();
    final ViewManager viewManager = surface.getViewManager();
    for (int i = 0; i < 8; i++) {
        this.addContinuousCommand(Integer.valueOf(Commands.CONT_COMMAND_KNOB1.intValue() + i), BeatstepControlSurface.BEATSTEP_KNOB_1 + i, new KnobRowViewCommand(i, this.model, surface));
        this.addContinuousCommand(Integer.valueOf(Commands.CONT_COMMAND_DEVICE_KNOB1.intValue() + i), BeatstepControlSurface.BEATSTEP_KNOB_9 + i, new KnobRowViewCommand(i + 8, this.model, surface));
    }
    this.addContinuousCommand(Commands.CONT_COMMAND_MASTER_KNOB, BeatstepControlSurface.BEATSTEP_KNOB_MAIN, new BeatstepPlayPositionCommand(this.model, surface));
    final PlayView playView = (PlayView) viewManager.getView(Views.VIEW_PLAY);
    playView.registerAftertouchCommand(new AftertouchAbstractPlayViewCommand<>(playView, this.model, surface));
}
Also used : KnobRowViewCommand(de.mossgrabers.beatstep.command.continuous.KnobRowViewCommand) ViewManager(de.mossgrabers.framework.view.ViewManager) BeatstepPlayPositionCommand(de.mossgrabers.beatstep.command.continuous.BeatstepPlayPositionCommand) BeatstepControlSurface(de.mossgrabers.beatstep.controller.BeatstepControlSurface) PlayView(de.mossgrabers.beatstep.view.PlayView)

Aggregations

BeatstepPlayPositionCommand (de.mossgrabers.beatstep.command.continuous.BeatstepPlayPositionCommand)1 KnobRowViewCommand (de.mossgrabers.beatstep.command.continuous.KnobRowViewCommand)1 BeatstepControlSurface (de.mossgrabers.beatstep.controller.BeatstepControlSurface)1 PlayView (de.mossgrabers.beatstep.view.PlayView)1 ViewManager (de.mossgrabers.framework.view.ViewManager)1