Search in sources :

Example 1 with SLParameterMode

use of de.mossgrabers.controller.novation.sl.mode.device.SLParameterMode in project DrivenByMoss by git-moss.

the class SLControllerSetup method createModes.

/**
 * {@inheritDoc}
 */
@Override
protected void createModes() {
    final SLControlSurface surface = this.getSurface();
    final ModeManager modeManager = surface.getModeManager();
    modeManager.register(Modes.VOLUME, new SLVolumeMode(surface, this.model));
    modeManager.register(Modes.TRACK, new SLTrackMode(surface, this.model));
    modeManager.register(Modes.DEVICE_PARAMS, new SLParameterMode(surface, this.model));
    modeManager.register(Modes.FIXED, new FixedMode(surface, this.model));
    modeManager.register(Modes.FRAME, new FrameMode(surface, this.model));
    modeManager.register(Modes.FUNCTIONS, new FunctionMode(surface, this.model));
    modeManager.register(Modes.PLAY_OPTIONS, new PlayOptionsMode(surface, this.model));
    modeManager.register(Modes.SESSION, new SessionMode(surface, this.model));
    modeManager.register(Modes.TRACK_DETAILS, new TrackTogglesMode(surface, this.model));
    modeManager.register(Modes.VIEW_SELECT, new ViewSelectMode(surface, this.model));
    modeManager.register(Modes.BROWSER, new DevicePresetsMode(surface, this.model));
}
Also used : TrackTogglesMode(de.mossgrabers.controller.novation.sl.mode.TrackTogglesMode) SLParameterMode(de.mossgrabers.controller.novation.sl.mode.device.SLParameterMode) FunctionMode(de.mossgrabers.controller.novation.sl.mode.FunctionMode) SLControlSurface(de.mossgrabers.controller.novation.sl.controller.SLControlSurface) FixedMode(de.mossgrabers.controller.novation.sl.mode.FixedMode) SLVolumeMode(de.mossgrabers.controller.novation.sl.mode.SLVolumeMode) SessionMode(de.mossgrabers.controller.novation.sl.mode.SessionMode) SLTrackMode(de.mossgrabers.controller.novation.sl.mode.SLTrackMode) DevicePresetsMode(de.mossgrabers.controller.novation.sl.mode.device.DevicePresetsMode) ViewSelectMode(de.mossgrabers.controller.novation.sl.mode.ViewSelectMode) FrameMode(de.mossgrabers.controller.novation.sl.mode.FrameMode) PlayOptionsMode(de.mossgrabers.controller.novation.sl.mode.PlayOptionsMode) ModeManager(de.mossgrabers.framework.featuregroup.ModeManager)

Example 2 with SLParameterMode

use of de.mossgrabers.controller.novation.sl.mode.device.SLParameterMode in project DrivenByMoss by git-moss.

the class PlayView method onButtonP1.

/**
 * {@inheritDoc}
 */
@Override
public void onButtonP1(final boolean isUp, final ButtonEvent event) {
    if (event != ButtonEvent.DOWN)
        return;
    final Modes activeModeId = this.surface.getModeManager().getActiveID();
    if (Modes.SESSION == activeModeId) {
        if (isUp)
            this.model.getSceneBank().selectNextPage();
        else
            this.model.getSceneBank().selectPreviousPage();
        return;
    }
    if (Modes.VOLUME.equals(activeModeId)) {
        new P2ButtonCommand(isUp, this.model, this.surface).execute(ButtonEvent.DOWN, 127);
        return;
    }
    if (Modes.TRACK.equals(activeModeId)) {
        new ButtonRowSelectCommand<>(3, this.model, this.surface).execute(ButtonEvent.DOWN, 127);
        return;
    }
    if (Modes.PLAY_OPTIONS.equals(activeModeId))
        return;
    final SLParameterMode mode = (SLParameterMode) this.surface.getModeManager().get(Modes.DEVICE_PARAMS);
    if (isUp)
        mode.selectNextItemPage();
    else
        mode.selectPreviousItemPage();
}
Also used : Modes(de.mossgrabers.framework.mode.Modes) P2ButtonCommand(de.mossgrabers.controller.novation.sl.command.trigger.P2ButtonCommand) SLParameterMode(de.mossgrabers.controller.novation.sl.mode.device.SLParameterMode)

Aggregations

SLParameterMode (de.mossgrabers.controller.novation.sl.mode.device.SLParameterMode)2 P2ButtonCommand (de.mossgrabers.controller.novation.sl.command.trigger.P2ButtonCommand)1 SLControlSurface (de.mossgrabers.controller.novation.sl.controller.SLControlSurface)1 FixedMode (de.mossgrabers.controller.novation.sl.mode.FixedMode)1 FrameMode (de.mossgrabers.controller.novation.sl.mode.FrameMode)1 FunctionMode (de.mossgrabers.controller.novation.sl.mode.FunctionMode)1 PlayOptionsMode (de.mossgrabers.controller.novation.sl.mode.PlayOptionsMode)1 SLTrackMode (de.mossgrabers.controller.novation.sl.mode.SLTrackMode)1 SLVolumeMode (de.mossgrabers.controller.novation.sl.mode.SLVolumeMode)1 SessionMode (de.mossgrabers.controller.novation.sl.mode.SessionMode)1 TrackTogglesMode (de.mossgrabers.controller.novation.sl.mode.TrackTogglesMode)1 ViewSelectMode (de.mossgrabers.controller.novation.sl.mode.ViewSelectMode)1 DevicePresetsMode (de.mossgrabers.controller.novation.sl.mode.device.DevicePresetsMode)1 ModeManager (de.mossgrabers.framework.featuregroup.ModeManager)1 Modes (de.mossgrabers.framework.mode.Modes)1