Search in sources :

Example 41 with ICursorDevice

use of de.mossgrabers.framework.daw.data.ICursorDevice in project DrivenByMoss by git-moss.

the class DeviceHandler method scrollParameterPage.

private void scrollParameterPage(final KnobMode knobMode, final MidiValue value) {
    if (isAbsolute(knobMode) || !this.increaseKnobMovement())
        return;
    final ICursorDevice cursorDevice = this.model.getCursorDevice();
    final IParameterBank parameterBank = cursorDevice.getParameterBank();
    if (this.isIncrease(knobMode, value))
        parameterBank.scrollForwards();
    else
        parameterBank.scrollBackwards();
    this.mvHelper.notifySelectedParameterPage();
}
Also used : IParameterBank(de.mossgrabers.framework.daw.data.bank.IParameterBank) ICursorDevice(de.mossgrabers.framework.daw.data.ICursorDevice)

Example 42 with ICursorDevice

use of de.mossgrabers.framework.daw.data.ICursorDevice in project DrivenByMoss by git-moss.

the class DeviceHandler method scrollParameterBank.

private void scrollParameterBank(final KnobMode knobMode, final MidiValue value) {
    if (isAbsolute(knobMode) || !this.increaseKnobMovement())
        return;
    final ICursorDevice cursorDevice = this.model.getCursorDevice();
    final IParameterBank parameterBank = cursorDevice.getParameterBank();
    if (this.isIncrease(knobMode, value))
        parameterBank.selectNextPage();
    else
        parameterBank.selectPreviousPage();
    this.mvHelper.notifySelectedParameterPage();
}
Also used : IParameterBank(de.mossgrabers.framework.daw.data.bank.IParameterBank) ICursorDevice(de.mossgrabers.framework.daw.data.ICursorDevice)

Example 43 with ICursorDevice

use of de.mossgrabers.framework.daw.data.ICursorDevice in project DrivenByMoss by git-moss.

the class DeviceLayerRightCommand method executeNormal.

/**
 * {@inheritDoc}
 */
@Override
public void executeNormal(final ButtonEvent event) {
    if (event != ButtonEvent.DOWN)
        return;
    final ICursorDevice cd = this.model.getCursorDevice();
    final IChannelBank<ILayer> bank = cd.getLayerBank();
    final Optional<ILayer> sel = bank.getSelectedItem();
    if (!cd.hasLayers() || sel.isEmpty())
        cd.selectNext();
    else
        bank.selectNextItem();
}
Also used : ILayer(de.mossgrabers.framework.daw.data.ILayer) ICursorDevice(de.mossgrabers.framework.daw.data.ICursorDevice)

Example 44 with ICursorDevice

use of de.mossgrabers.framework.daw.data.ICursorDevice in project DrivenByMoss by git-moss.

the class DeviceLayerRightCommand method executeShifted.

/**
 * {@inheritDoc}
 */
@Override
public void executeShifted(final ButtonEvent event) {
    if (event != ButtonEvent.DOWN)
        return;
    // Enter layer
    final ICursorDevice cd = this.model.getCursorDevice();
    if (!cd.hasLayers())
        return;
    final IChannelBank<ILayer> bank = cd.getLayerBank();
    final Optional<ILayer> layer = bank.getSelectedItem();
    if (layer.isEmpty())
        bank.getItem(0).select();
    else
        layer.get().enter();
}
Also used : ILayer(de.mossgrabers.framework.daw.data.ILayer) ICursorDevice(de.mossgrabers.framework.daw.data.ICursorDevice)

Example 45 with ICursorDevice

use of de.mossgrabers.framework.daw.data.ICursorDevice in project DrivenByMoss by git-moss.

the class DeviceLayerLeftCommand method canExecute.

/**
 * Check if the command can be executed.
 *
 * @return True if it can
 */
public boolean canExecute() {
    if (this.surface.isShiftPressed())
        return true;
    final ICursorDevice cd = this.model.getCursorDevice();
    final IChannelBank<ILayer> bank = cd.getLayerBank();
    final Optional<ILayer> layer = bank.getSelectedItem();
    return cd.hasLayers() && layer.isPresent() ? bank.canScrollBackwards() : cd.canSelectPreviousFX();
}
Also used : ILayer(de.mossgrabers.framework.daw.data.ILayer) ICursorDevice(de.mossgrabers.framework.daw.data.ICursorDevice)

Aggregations

ICursorDevice (de.mossgrabers.framework.daw.data.ICursorDevice)67 IParameter (de.mossgrabers.framework.daw.data.IParameter)17 IParameterBank (de.mossgrabers.framework.daw.data.bank.IParameterBank)14 ModeManager (de.mossgrabers.framework.featuregroup.ModeManager)10 ITextDisplay (de.mossgrabers.framework.controller.display.ITextDisplay)8 ILayer (de.mossgrabers.framework.daw.data.ILayer)8 IParameterPageBank (de.mossgrabers.framework.daw.data.bank.IParameterPageBank)8 ITrack (de.mossgrabers.framework.daw.data.ITrack)7 ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)7 IBrowser (de.mossgrabers.framework.daw.IBrowser)5 IDeviceBank (de.mossgrabers.framework.daw.data.bank.IDeviceBank)5 Modes (de.mossgrabers.framework.mode.Modes)5 IPadGrid (de.mossgrabers.framework.controller.grid.IPadGrid)3 ITransport (de.mossgrabers.framework.daw.ITransport)3 IDevice (de.mossgrabers.framework.daw.data.IDevice)3 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)3 IDrumPadBank (de.mossgrabers.framework.daw.data.bank.IDrumPadBank)3 ViewManager (de.mossgrabers.framework.featuregroup.ViewManager)3 PushConfiguration (de.mossgrabers.controller.ableton.push.PushConfiguration)2 ColorEx (de.mossgrabers.framework.controller.color.ColorEx)2