Search in sources :

Example 1 with PlayView

use of de.mossgrabers.beatstep.view.PlayView in project DrivenByMoss by git-moss.

the class BeatstepControllerSetup method createViews.

/**
 * {@inheritDoc}
 */
@Override
protected void createViews() {
    final BeatstepControlSurface surface = this.getSurface();
    final ViewManager viewManager = surface.getViewManager();
    viewManager.registerView(Views.VIEW_TRACK, new TrackView(surface, this.model));
    viewManager.registerView(Views.VIEW_DEVICE, new DeviceView(surface, this.model));
    viewManager.registerView(Views.VIEW_PLAY, new PlayView(surface, this.model));
    viewManager.registerView(Views.VIEW_DRUM, new DrumView(surface, this.model));
    viewManager.registerView(Views.VIEW_SEQUENCER, new SequencerView(surface, this.model));
    viewManager.registerView(Views.VIEW_SESSION, new SessionView(surface, this.model));
    viewManager.registerView(Views.VIEW_BROWSER, new BrowserView(surface, this.model));
    viewManager.registerView(Views.VIEW_SHIFT, new ShiftView(surface, this.model));
}
Also used : SequencerView(de.mossgrabers.beatstep.view.SequencerView) TrackView(de.mossgrabers.beatstep.view.TrackView) ShiftView(de.mossgrabers.beatstep.view.ShiftView) ViewManager(de.mossgrabers.framework.view.ViewManager) SessionView(de.mossgrabers.beatstep.view.SessionView) DeviceView(de.mossgrabers.beatstep.view.DeviceView) BrowserView(de.mossgrabers.beatstep.view.BrowserView) BeatstepControlSurface(de.mossgrabers.beatstep.controller.BeatstepControlSurface) DrumView(de.mossgrabers.beatstep.view.DrumView) PlayView(de.mossgrabers.beatstep.view.PlayView)

Example 2 with PlayView

use of de.mossgrabers.beatstep.view.PlayView 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

BeatstepControlSurface (de.mossgrabers.beatstep.controller.BeatstepControlSurface)2 PlayView (de.mossgrabers.beatstep.view.PlayView)2 ViewManager (de.mossgrabers.framework.view.ViewManager)2 BeatstepPlayPositionCommand (de.mossgrabers.beatstep.command.continuous.BeatstepPlayPositionCommand)1 KnobRowViewCommand (de.mossgrabers.beatstep.command.continuous.KnobRowViewCommand)1 BrowserView (de.mossgrabers.beatstep.view.BrowserView)1 DeviceView (de.mossgrabers.beatstep.view.DeviceView)1 DrumView (de.mossgrabers.beatstep.view.DrumView)1 SequencerView (de.mossgrabers.beatstep.view.SequencerView)1 SessionView (de.mossgrabers.beatstep.view.SessionView)1 ShiftView (de.mossgrabers.beatstep.view.ShiftView)1 TrackView (de.mossgrabers.beatstep.view.TrackView)1