Search in sources :

Example 26 with ModeManager

use of de.mossgrabers.framework.mode.ModeManager in project DrivenByMoss by git-moss.

the class ControlView method onButtonRow2Select.

/**
 * {@inheritDoc}
 */
@Override
public void onButtonRow2Select() {
    final ModeManager modeManager = this.surface.getModeManager();
    modeManager.setActiveMode(modeManager.getActiveModeId() == Modes.MODE_TRACK_TOGGLES ? Modes.MODE_FRAME : Modes.MODE_TRACK_TOGGLES);
}
Also used : ModeManager(de.mossgrabers.framework.mode.ModeManager)

Example 27 with ModeManager

use of de.mossgrabers.framework.mode.ModeManager in project DrivenByMoss by git-moss.

the class DeviceKnobRowCommand method execute.

/**
 * {@inheritDoc}
 */
@Override
public void execute(final int value) {
    if (!this.model.hasSelectedDevice())
        return;
    // Convert negative relative value
    final int v = value > 64 ? 127 - (value - 64) : value;
    final ModeManager modeManager = this.surface.getModeManager();
    if (!modeManager.isActiveMode(Modes.MODE_PARAMS))
        modeManager.setActiveMode(Modes.MODE_PARAMS);
    modeManager.getMode(Modes.MODE_PARAMS).onValueKnob(this.index, v);
}
Also used : ModeManager(de.mossgrabers.framework.mode.ModeManager)

Example 28 with ModeManager

use of de.mossgrabers.framework.mode.ModeManager in project DrivenByMoss by git-moss.

the class ButtonRowSelectCommand method onKnobRow2Select.

private void onKnobRow2Select() {
    final ModeManager modeManager = this.surface.getModeManager();
    if (modeManager.isActiveMode(Modes.MODE_MASTER)) {
        this.activateTrackMode(true, false);
        return;
    }
    if (modeManager.isActiveMode(Modes.MODE_TRACK)) {
        if (this.model.isEffectTrackBankActive())
            this.activateMasterMode(true);
        else
            this.activateTrackMode(true, true);
        return;
    }
    this.activateTrackMode(true, this.model.isEffectTrackBankActive());
}
Also used : ModeManager(de.mossgrabers.framework.mode.ModeManager)

Example 29 with ModeManager

use of de.mossgrabers.framework.mode.ModeManager in project DrivenByMoss by git-moss.

the class TransportControl method turnOffTransport.

private void turnOffTransport() {
    this.surface.turnOffTransport();
    final ModeManager modeManager = this.surface.getModeManager();
    if (modeManager.isActiveMode(Modes.MODE_VIEW_SELECT))
        modeManager.restoreMode();
}
Also used : ModeManager(de.mossgrabers.framework.mode.ModeManager)

Example 30 with ModeManager

use of de.mossgrabers.framework.mode.ModeManager in project DrivenByMoss by git-moss.

the class PushControllerSetup method createModes.

/**
 * {@inheritDoc}
 */
@Override
protected void createModes() {
    final PushControlSurface surface = this.getSurface();
    final ModeManager modeManager = surface.getModeManager();
    modeManager.registerMode(Modes.MODE_VOLUME, new VolumeMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_PAN, new PanMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_CROSSFADER, new CrossfaderMode(surface, this.model));
    final SendMode modeSend = new SendMode(surface, this.model);
    modeManager.registerMode(Modes.MODE_SEND1, modeSend);
    modeManager.registerMode(Modes.MODE_SEND2, modeSend);
    modeManager.registerMode(Modes.MODE_SEND3, modeSend);
    modeManager.registerMode(Modes.MODE_SEND4, modeSend);
    modeManager.registerMode(Modes.MODE_SEND5, modeSend);
    modeManager.registerMode(Modes.MODE_SEND6, modeSend);
    modeManager.registerMode(Modes.MODE_MASTER, new MasterMode(surface, this.model, false));
    modeManager.registerMode(Modes.MODE_MASTER_TEMP, new MasterMode(surface, this.model, true));
    modeManager.registerMode(Modes.MODE_TRACK, new TrackMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_TRACK_DETAILS, new TrackDetailsMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_DEVICE_LAYER_DETAILS, new LayerDetailsMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_CLIP, new ClipMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_NOTE, new NoteMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_FRAME, new FrameMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_SCALES, new ScalesMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_SCALE_LAYOUT, new ScaleLayoutMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_ACCENT, new AccentMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_FIXED, new FixedMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_RIBBON, new RibbonMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_GROOVE, new GrooveMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_VIEW_SELECT, new NoteViewSelectMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_AUTOMATION, new AutomationMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_TRANSPORT, new TransportMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_DEVICE_PARAMS, new DeviceParamsMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_DEVICE_LAYER, new DeviceLayerMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_BROWSER, new DeviceBrowserMode(surface, this.model));
    modeManager.registerMode(Modes.MODE_DEVICE_LAYER_VOLUME, new DeviceLayerModeVolume(surface, this.model));
    modeManager.registerMode(Modes.MODE_DEVICE_LAYER_PAN, new DeviceLayerModePan(surface, this.model));
    final DeviceLayerModeSend modeLayerSend = new DeviceLayerModeSend(surface, this.model);
    modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND1, modeLayerSend);
    modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND2, modeLayerSend);
    modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND3, modeLayerSend);
    modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND4, modeLayerSend);
    modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND5, modeLayerSend);
    modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND6, modeLayerSend);
    if (this.isPush2) {
        modeManager.registerMode(Modes.MODE_SEND7, modeSend);
        modeManager.registerMode(Modes.MODE_SEND8, modeSend);
        modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND7, modeLayerSend);
        modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND8, modeLayerSend);
        modeManager.registerMode(Modes.MODE_SETUP, new SetupMode(surface, this.model));
        modeManager.registerMode(Modes.MODE_INFO, new InfoMode(surface, this.model));
    } else
        modeManager.registerMode(Modes.MODE_CONFIGURATION, new ConfigurationMode(surface, this.model));
    if (this.host.hasClips()) {
        modeManager.registerMode(Modes.MODE_SESSION_VIEW_SELECT, new SessionViewSelectMode(surface, this.model));
    }
}
Also used : NoteMode(de.mossgrabers.push.mode.NoteMode) ScalesMode(de.mossgrabers.push.mode.ScalesMode) GrooveMode(de.mossgrabers.push.mode.GrooveMode) TrackMode(de.mossgrabers.push.mode.track.TrackMode) DeviceLayerModeVolume(de.mossgrabers.push.mode.device.DeviceLayerModeVolume) MasterMode(de.mossgrabers.push.mode.track.MasterMode) LayerDetailsMode(de.mossgrabers.push.mode.track.LayerDetailsMode) DeviceParamsMode(de.mossgrabers.push.mode.device.DeviceParamsMode) DeviceLayerModePan(de.mossgrabers.push.mode.device.DeviceLayerModePan) DeviceLayerMode(de.mossgrabers.push.mode.device.DeviceLayerMode) ScaleLayoutMode(de.mossgrabers.push.mode.ScaleLayoutMode) DeviceLayerModeSend(de.mossgrabers.push.mode.device.DeviceLayerModeSend) ConfigurationMode(de.mossgrabers.push.mode.ConfigurationMode) SendMode(de.mossgrabers.push.mode.track.SendMode) AutomationMode(de.mossgrabers.push.mode.AutomationMode) TrackDetailsMode(de.mossgrabers.push.mode.track.TrackDetailsMode) ModeManager(de.mossgrabers.framework.mode.ModeManager) InfoMode(de.mossgrabers.push.mode.InfoMode) PanMode(de.mossgrabers.push.mode.track.PanMode) FixedMode(de.mossgrabers.push.mode.FixedMode) SessionViewSelectMode(de.mossgrabers.push.mode.SessionViewSelectMode) DeviceBrowserMode(de.mossgrabers.push.mode.device.DeviceBrowserMode) AccentMode(de.mossgrabers.push.mode.AccentMode) SetupMode(de.mossgrabers.push.mode.SetupMode) RibbonMode(de.mossgrabers.push.mode.RibbonMode) NoteViewSelectMode(de.mossgrabers.push.mode.NoteViewSelectMode) CrossfaderMode(de.mossgrabers.push.mode.track.CrossfaderMode) ClipMode(de.mossgrabers.push.mode.track.ClipMode) VolumeMode(de.mossgrabers.push.mode.track.VolumeMode) TransportMode(de.mossgrabers.push.mode.TransportMode) PushControlSurface(de.mossgrabers.push.controller.PushControlSurface) FrameMode(de.mossgrabers.push.mode.FrameMode)

Aggregations

ModeManager (de.mossgrabers.framework.mode.ModeManager)67 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)20 ITrack (de.mossgrabers.framework.daw.data.ITrack)18 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)9 ViewManager (de.mossgrabers.framework.view.ViewManager)7 PushConfiguration (de.mossgrabers.push.PushConfiguration)7 View (de.mossgrabers.framework.view.View)6 SceneView (de.mossgrabers.framework.view.SceneView)5 PushControlSurface (de.mossgrabers.push.controller.PushControlSurface)5 ITrackBank (de.mossgrabers.framework.daw.ITrackBank)4 IChannel (de.mossgrabers.framework.daw.data.IChannel)4 ITransport (de.mossgrabers.framework.daw.ITransport)3 DeviceBrowserMode (de.mossgrabers.push.mode.device.DeviceBrowserMode)3 DeviceParamsMode (de.mossgrabers.push.mode.device.DeviceParamsMode)3 APCControlSurface (de.mossgrabers.apc.controller.APCControlSurface)2 APCminiControlSurface (de.mossgrabers.apcmini.controller.APCminiControlSurface)2 ICursorClip (de.mossgrabers.framework.daw.ICursorClip)2 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)2 AbstractSequencerView (de.mossgrabers.framework.view.AbstractSequencerView)2 LaunchpadControlSurface (de.mossgrabers.launchpad.controller.LaunchpadControlSurface)2