Search in sources :

Example 1 with KnobRowViewCommand

use of de.mossgrabers.controller.arturia.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.addRelativeKnob(ContinuousID.get(ContinuousID.KNOB1, i), "Knob " + (i + 1), new KnobRowViewCommand(i, this.model, surface), BindType.CC, 2, BeatstepControlSurface.BEATSTEP_KNOB_1 + i, RelativeEncoding.OFFSET_BINARY);
        this.addRelativeKnob(ContinuousID.get(ContinuousID.DEVICE_KNOB1, i), "Knob " + (i + 9), new KnobRowViewCommand(i + 8, this.model, surface), BindType.CC, 2, BeatstepControlSurface.BEATSTEP_KNOB_9 + i, RelativeEncoding.OFFSET_BINARY);
    }
    this.addRelativeKnob(ContinuousID.MASTER_KNOB, "Master", new PlayPositionCommand<>(this.model, surface), BindType.CC, 2, BeatstepControlSurface.BEATSTEP_KNOB_MAIN, RelativeEncoding.OFFSET_BINARY);
    final PlayView playView = (PlayView) viewManager.get(Views.PLAY);
    playView.registerAftertouchCommand(new AftertouchViewCommand<>(playView, this.model, surface));
}
Also used : KnobRowViewCommand(de.mossgrabers.controller.arturia.beatstep.command.continuous.KnobRowViewCommand) ViewManager(de.mossgrabers.framework.featuregroup.ViewManager) BeatstepControlSurface(de.mossgrabers.controller.arturia.beatstep.controller.BeatstepControlSurface) PlayView(de.mossgrabers.controller.arturia.beatstep.view.PlayView)

Aggregations

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