Search in sources :

Example 56 with ViewManager

use of de.mossgrabers.framework.featuregroup.ViewManager in project DrivenByMoss by git-moss.

the class SLControllerSetup method createViews.

/**
 * {@inheritDoc}
 */
@Override
protected void createViews() {
    final SLControlSurface surface = this.getSurface();
    final ViewManager viewManager = surface.getViewManager();
    viewManager.register(Views.PLAY, new PlayView(surface, this.model));
    viewManager.register(Views.CONTROL, new ControlView(surface, this.model));
}
Also used : ViewManager(de.mossgrabers.framework.featuregroup.ViewManager) SLControlSurface(de.mossgrabers.controller.novation.sl.controller.SLControlSurface) PlayView(de.mossgrabers.controller.novation.sl.view.PlayView) ControlView(de.mossgrabers.controller.novation.sl.view.ControlView)

Example 57 with ViewManager

use of de.mossgrabers.framework.featuregroup.ViewManager in project DrivenByMoss by git-moss.

the class SelectSessionViewCommand method execute.

/**
 * {@inheritDoc}
 */
@Override
public void execute(final ButtonEvent event, final int velocity) {
    final ViewManager viewManager = this.surface.getViewManager();
    final SessionView sessionView = (SessionView) viewManager.get(Views.SESSION);
    final Configuration configuration = this.surface.getConfiguration();
    switch(event) {
        case DOWN:
            this.temporaryMode = TemporaryMode.OFF;
            // Display Mix view with Shift
            if (this.surface.isShiftPressed()) {
                this.surface.setTriggerConsumed(ButtonID.SESSION);
                viewManager.setActive(Views.MIX);
                this.notifyViewName(Views.MIX, false, false);
            }
            break;
        case LONG:
            // Only trigger birds-eye-view if session view is already active
            if (viewManager.isActive(Views.SESSION)) {
                if (this.temporaryMode != TemporaryMode.POSSIBLE) {
                    this.surface.setTriggerConsumed(ButtonID.SESSION);
                    sessionView.setBirdsEyeActive(true);
                    this.notifyViewName(Views.SESSION, true, configuration.isFlipSession());
                }
                return;
            }
            this.activatedView(viewManager, configuration);
            break;
        case UP:
            if (this.temporaryMode == TemporaryMode.ACTIVE) {
                this.surface.getViewManager().restore();
                return;
            }
            if (this.temporaryMode == TemporaryMode.POSSIBLE)
                return;
            if (viewManager.isActive(Views.SESSION)) {
                // Disable birds-eye-view if active
                if (sessionView.isBirdsEyeActive()) {
                    sessionView.setBirdsEyeActive(false);
                    this.notifyViewName(Views.SESSION, false, configuration.isFlipSession());
                    return;
                }
                // Flip clips
                final boolean flipped = !configuration.isFlipSession();
                configuration.setFlipSession(flipped);
                this.notifyViewName(Views.SESSION, false, flipped);
                return;
            }
            this.activatedView(viewManager, configuration);
            break;
    }
}
Also used : Configuration(de.mossgrabers.framework.configuration.Configuration) LaunchpadConfiguration(de.mossgrabers.controller.novation.launchpad.LaunchpadConfiguration) ViewManager(de.mossgrabers.framework.featuregroup.ViewManager) SessionView(de.mossgrabers.controller.novation.launchpad.view.SessionView)

Example 58 with ViewManager

use of de.mossgrabers.framework.featuregroup.ViewManager in project DrivenByMoss by git-moss.

the class StopClipCommand method execute.

/**
 * {@inheritDoc}
 */
@Override
public void execute(final ButtonEvent event, final int velocity) {
    if (this.surface.isPro() && this.surface.isShiftPressed()) {
        if (event != ButtonEvent.DOWN)
            return;
        final ViewManager viewManager = this.surface.getViewManager();
        if (viewManager.isActive(Views.SHIFT))
            viewManager.restore();
        viewManager.setActive(Views.SHUFFLE);
        return;
    }
    this.onModeButton(event, Modes.STOP_CLIP, "Stop Clip");
}
Also used : ViewManager(de.mossgrabers.framework.featuregroup.ViewManager)

Aggregations

ViewManager (de.mossgrabers.framework.featuregroup.ViewManager)58 ITrack (de.mossgrabers.framework.daw.data.ITrack)12 ModeManager (de.mossgrabers.framework.featuregroup.ModeManager)11 Views (de.mossgrabers.framework.view.Views)11 INoteMode (de.mossgrabers.framework.mode.INoteMode)5 BeatstepControlSurface (de.mossgrabers.controller.arturia.beatstep.controller.BeatstepControlSurface)4 MaschineControlSurface (de.mossgrabers.controller.ni.maschine.mk3.controller.MaschineControlSurface)4 IView (de.mossgrabers.framework.featuregroup.IView)4 DrumView (de.mossgrabers.controller.ni.maschine.mk3.view.DrumView)3 ConfiguredRecordCommand (de.mossgrabers.framework.command.trigger.transport.ConfiguredRecordCommand)3 FeatureGroupButtonColorSupplier (de.mossgrabers.framework.command.trigger.view.FeatureGroupButtonColorSupplier)3 IHost (de.mossgrabers.framework.daw.IHost)3 ITransport (de.mossgrabers.framework.daw.ITransport)3 ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)3 PlayView (de.mossgrabers.controller.arturia.beatstep.view.PlayView)2 LaunchkeyMk3ControlSurface (de.mossgrabers.controller.novation.launchkey.maxi.controller.LaunchkeyMk3ControlSurface)2 LaunchkeyMiniMk3ControlSurface (de.mossgrabers.controller.novation.launchkey.mini.controller.LaunchkeyMiniMk3ControlSurface)2 SLMkIIIControlSurface (de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface)2 DrumView (de.mossgrabers.controller.novation.slmkiii.view.DrumView)2 Configuration (de.mossgrabers.framework.configuration.Configuration)2