Search in sources :

Example 1 with DeviceParamsMode

use of de.mossgrabers.push.mode.device.DeviceParamsMode in project DrivenByMoss by git-moss.

the class PushCursorCommand method scrollRight.

/**
 * {@inheritDoc}
 */
@Override
protected void scrollRight() {
    final ModeManager modeManager = this.surface.getModeManager();
    if (modeManager.isActiveMode(Modes.MODE_DEVICE_PARAMS)) {
        final DeviceParamsMode activeMode = (DeviceParamsMode) modeManager.getActiveMode();
        if (this.surface.isShiftPressed())
            activeMode.selectNextPageBank();
        else
            activeMode.selectNextPage();
        return;
    }
    if (modeManager.isActiveMode(Modes.MODE_BROWSER)) {
        ((DeviceBrowserMode) modeManager.getActiveMode()).resetFilterColumn();
        this.model.getBrowser().nextContentType();
        return;
    }
    if (Modes.isLayerMode(modeManager.getActiveModeId())) {
        if (this.surface.isShiftPressed())
            this.model.getCursorDevice().nextLayerOrDrumPadBank();
        else
            this.model.getCursorDevice().nextLayerOrDrumPad();
        return;
    }
    this.scrollTracksRight();
}
Also used : DeviceParamsMode(de.mossgrabers.push.mode.device.DeviceParamsMode) DeviceBrowserMode(de.mossgrabers.push.mode.device.DeviceBrowserMode) ModeManager(de.mossgrabers.framework.mode.ModeManager)

Example 2 with DeviceParamsMode

use of de.mossgrabers.push.mode.device.DeviceParamsMode 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)

Example 3 with DeviceParamsMode

use of de.mossgrabers.push.mode.device.DeviceParamsMode in project DrivenByMoss by git-moss.

the class PushCursorCommand method scrollLeft.

/**
 * {@inheritDoc}
 */
@Override
protected void scrollLeft() {
    final ModeManager modeManager = this.surface.getModeManager();
    if (modeManager.isActiveMode(Modes.MODE_DEVICE_PARAMS)) {
        final DeviceParamsMode paramsMode = (DeviceParamsMode) modeManager.getActiveMode();
        if (this.surface.isShiftPressed())
            paramsMode.selectPreviousPageBank();
        else
            paramsMode.selectPreviousPage();
        return;
    }
    if (modeManager.isActiveMode(Modes.MODE_BROWSER)) {
        ((DeviceBrowserMode) modeManager.getActiveMode()).resetFilterColumn();
        this.model.getBrowser().previousContentType();
        return;
    }
    if (Modes.isLayerMode(modeManager.getActiveModeId())) {
        if (this.surface.isShiftPressed())
            this.model.getCursorDevice().previousLayerOrDrumPadBank();
        else
            this.model.getCursorDevice().previousLayerOrDrumPad();
        return;
    }
    this.scrollTracksLeft();
}
Also used : DeviceParamsMode(de.mossgrabers.push.mode.device.DeviceParamsMode) DeviceBrowserMode(de.mossgrabers.push.mode.device.DeviceBrowserMode) ModeManager(de.mossgrabers.framework.mode.ModeManager)

Example 4 with DeviceParamsMode

use of de.mossgrabers.push.mode.device.DeviceParamsMode in project DrivenByMoss by git-moss.

the class PushCursorCommand method updateArrowStates.

/**
 * {@inheritDoc}
 */
@Override
protected void updateArrowStates() {
    final IChannelBank tb = this.model.getCurrentTrackBank();
    this.canScrollUp = tb.canScrollScenesUp();
    this.canScrollDown = tb.canScrollScenesDown();
    final ModeManager modeManager = this.surface.getModeManager();
    if (modeManager.isActiveMode(Modes.MODE_DEVICE_PARAMS)) {
        final DeviceParamsMode mode = (DeviceParamsMode) modeManager.getActiveMode();
        this.canScrollLeft = mode.canSelectPreviousPage();
        this.canScrollRight = mode.canSelectNextPage();
        return;
    }
    if (modeManager.isActiveMode(Modes.MODE_BROWSER)) {
        final IBrowser browser = this.model.getBrowser();
        final int index = browser.getSelectedContentTypeIndex();
        this.canScrollLeft = index > 0;
        this.canScrollRight = index < browser.getContentTypeNames().length - 1;
        return;
    }
    if (Modes.isLayerMode(modeManager.getActiveModeId())) {
        final ICursorDevice cd = this.model.getCursorDevice();
        this.canScrollLeft = cd.canScrollLayersOrDrumPadsUp();
        this.canScrollRight = cd.canScrollLayersOrDrumPadsDown();
        return;
    }
    final ITrack sel = tb.getSelectedTrack();
    final int selIndex = sel != null ? sel.getIndex() : -1;
    this.canScrollLeft = selIndex > 0 || tb.canScrollTracksUp();
    this.canScrollRight = selIndex >= 0 && selIndex < 7 && tb.getTrack(selIndex + 1).doesExist() || tb.canScrollTracksDown();
}
Also used : IBrowser(de.mossgrabers.framework.daw.IBrowser) ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) DeviceParamsMode(de.mossgrabers.push.mode.device.DeviceParamsMode) ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice) ModeManager(de.mossgrabers.framework.mode.ModeManager)

Aggregations

ModeManager (de.mossgrabers.framework.mode.ModeManager)4 DeviceParamsMode (de.mossgrabers.push.mode.device.DeviceParamsMode)4 DeviceBrowserMode (de.mossgrabers.push.mode.device.DeviceBrowserMode)3 IBrowser (de.mossgrabers.framework.daw.IBrowser)1 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)1 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)1 ITrack (de.mossgrabers.framework.daw.data.ITrack)1 PushControlSurface (de.mossgrabers.push.controller.PushControlSurface)1 AccentMode (de.mossgrabers.push.mode.AccentMode)1 AutomationMode (de.mossgrabers.push.mode.AutomationMode)1 ConfigurationMode (de.mossgrabers.push.mode.ConfigurationMode)1 FixedMode (de.mossgrabers.push.mode.FixedMode)1 FrameMode (de.mossgrabers.push.mode.FrameMode)1 GrooveMode (de.mossgrabers.push.mode.GrooveMode)1 InfoMode (de.mossgrabers.push.mode.InfoMode)1 NoteMode (de.mossgrabers.push.mode.NoteMode)1 NoteViewSelectMode (de.mossgrabers.push.mode.NoteViewSelectMode)1 RibbonMode (de.mossgrabers.push.mode.RibbonMode)1 ScaleLayoutMode (de.mossgrabers.push.mode.ScaleLayoutMode)1 ScalesMode (de.mossgrabers.push.mode.ScalesMode)1