Search in sources :

Example 1 with ParametersMode

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

the class SLMkIIIControllerSetup method createModes.

/**
 * {@inheritDoc}
 */
@Override
protected void createModes() {
    final SLMkIIIControlSurface surface = this.getSurface();
    final ModeManager modeManager = surface.getModeManager();
    // Required for button combinations in modes
    this.addButton(ButtonID.DELETE, "Clear", NopCommand.INSTANCE, 15, SLMkIIIControlSurface.MKIII_CLEAR, () -> surface.isPressed(ButtonID.DELETE) ? SLMkIIIColorManager.SLMKIII_AMBER : SLMkIIIColorManager.SLMKIII_AMBER_HALF);
    modeManager.register(Modes.TRACK, new SLMkIIITrackMode(surface, this.model));
    modeManager.register(Modes.VOLUME, new SLMkIIIVolumeMode(surface, this.model));
    modeManager.register(Modes.PAN, new SLMkIIIPanMode(surface, this.model));
    for (int i = 0; i < 8; i++) modeManager.register(Modes.get(Modes.SEND1, i), new SLMkIIISendMode(i, surface, this.model));
    modeManager.register(Modes.DEVICE_PARAMS, new ParametersMode(surface, this.model));
    modeManager.register(Modes.BROWSER, new BrowserMode(surface, this.model));
    modeManager.register(Modes.USER, new UserMode(surface, this.model));
    modeManager.register(Modes.FUNCTIONS, new OptionsMode(surface, this.model));
    modeManager.register(Modes.GROOVE, new SequencerResolutionMode(surface, this.model));
    modeManager.register(Modes.NOTE, new NoteMode(surface, this.model));
}
Also used : NoteMode(de.mossgrabers.controller.novation.slmkiii.mode.NoteMode) SLMkIIIPanMode(de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIIPanMode) SLMkIIIControlSurface(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface) ParametersMode(de.mossgrabers.controller.novation.slmkiii.mode.device.ParametersMode) OptionsMode(de.mossgrabers.controller.novation.slmkiii.mode.OptionsMode) SequencerResolutionMode(de.mossgrabers.controller.novation.slmkiii.mode.SequencerResolutionMode) BrowserMode(de.mossgrabers.controller.novation.slmkiii.mode.BrowserMode) SLMkIIITrackMode(de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIITrackMode) UserMode(de.mossgrabers.controller.novation.slmkiii.mode.device.UserMode) SLMkIIIVolumeMode(de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIIVolumeMode) ModeManager(de.mossgrabers.framework.featuregroup.ModeManager) SLMkIIISendMode(de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIISendMode)

Example 2 with ParametersMode

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

the class DeviceModeCommand method execute.

/**
 * {@inheritDoc}
 */
@Override
public void execute(final ButtonEvent event, final int velocity) {
    if (event != ButtonEvent.UP)
        return;
    final IBrowser browser = this.model.getBrowser();
    if (browser != null && browser.isActive())
        browser.stopBrowsing(!this.surface.isShiftPressed());
    final ModeManager modeManager = this.surface.getModeManager();
    if (modeManager.isActive(Modes.DEVICE_PARAMS)) {
        final ParametersMode parametersMode = (ParametersMode) modeManager.get(Modes.DEVICE_PARAMS);
        parametersMode.setShowDevices(!parametersMode.isShowDevices());
        return;
    }
    this.deviceModeSelectCommand.execute(ButtonEvent.DOWN, 127);
}
Also used : ParametersMode(de.mossgrabers.controller.novation.slmkiii.mode.device.ParametersMode) IBrowser(de.mossgrabers.framework.daw.IBrowser) ModeManager(de.mossgrabers.framework.featuregroup.ModeManager)

Aggregations

ParametersMode (de.mossgrabers.controller.novation.slmkiii.mode.device.ParametersMode)2 ModeManager (de.mossgrabers.framework.featuregroup.ModeManager)2 SLMkIIIControlSurface (de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface)1 BrowserMode (de.mossgrabers.controller.novation.slmkiii.mode.BrowserMode)1 NoteMode (de.mossgrabers.controller.novation.slmkiii.mode.NoteMode)1 OptionsMode (de.mossgrabers.controller.novation.slmkiii.mode.OptionsMode)1 SequencerResolutionMode (de.mossgrabers.controller.novation.slmkiii.mode.SequencerResolutionMode)1 UserMode (de.mossgrabers.controller.novation.slmkiii.mode.device.UserMode)1 SLMkIIIPanMode (de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIIPanMode)1 SLMkIIISendMode (de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIISendMode)1 SLMkIIITrackMode (de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIITrackMode)1 SLMkIIIVolumeMode (de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIIVolumeMode)1 IBrowser (de.mossgrabers.framework.daw.IBrowser)1