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();
}
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();
}
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();
}
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();
}
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();
}
Aggregations