Search in sources :

Example 1 with NoteMode

use of de.mossgrabers.controller.akai.fire.mode.NoteMode in project DrivenByMoss by git-moss.

the class FireSelectButtonCommand method execute.

/**
 * {@inheritDoc}
 */
@Override
public void execute(final ButtonEvent event, final int velocity) {
    if (velocity > 0)
        return;
    final ModeManager modeManager = this.surface.getModeManager();
    if (modeManager.isActive(Modes.NOTE)) {
        ((NoteMode) modeManager.get(Modes.NOTE)).resetTranspose();
        return;
    }
    if (modeManager.isActive(Modes.BROWSER)) {
        ((FireBrowserCommand) this.surface.getButton(ButtonID.BROWSE).getCommand()).discardBrowser(true);
        return;
    }
    final FireConfiguration configuration = this.surface.getConfiguration();
    final ICursorDevice cursorDevice = this.model.getCursorDevice();
    if (modeManager.isActive(Modes.DEVICE_PARAMS) && configuration.isDeleteModeActive()) {
        cursorDevice.remove();
        configuration.toggleDeleteModeActive();
        return;
    }
    cursorDevice.toggleWindowOpen();
}
Also used : NoteMode(de.mossgrabers.controller.akai.fire.mode.NoteMode) ICursorDevice(de.mossgrabers.framework.daw.data.ICursorDevice) ModeManager(de.mossgrabers.framework.featuregroup.ModeManager) FireConfiguration(de.mossgrabers.controller.akai.fire.FireConfiguration)

Aggregations

FireConfiguration (de.mossgrabers.controller.akai.fire.FireConfiguration)1 NoteMode (de.mossgrabers.controller.akai.fire.mode.NoteMode)1 ICursorDevice (de.mossgrabers.framework.daw.data.ICursorDevice)1 ModeManager (de.mossgrabers.framework.featuregroup.ModeManager)1