Search in sources :

Example 1 with FireConfiguration

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

the class StepSequencerSelectCommand method executeShifted.

/**
 * {@inheritDoc}}
 */
@Override
public void executeShifted(final ButtonEvent event) {
    if (event != ButtonEvent.DOWN)
        return;
    final FireConfiguration configuration = this.surface.getConfiguration();
    configuration.setAccentEnabled(!configuration.isAccentActive());
}
Also used : FireConfiguration(de.mossgrabers.controller.akai.fire.FireConfiguration)

Example 2 with FireConfiguration

use of de.mossgrabers.controller.akai.fire.FireConfiguration 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)

Example 3 with FireConfiguration

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

the class SessionView method handleButtonCombinations.

/**
 * {@inheritDoc}
 */
@Override
protected boolean handleButtonCombinations(final ITrack track, final ISlot slot) {
    final boolean result = super.handleButtonCombinations(track, slot);
    if (result)
        return true;
    // Stop clip with normal stop button
    if (this.isButtonCombination(ButtonID.STOP)) {
        track.stop();
        return true;
    }
    final FireConfiguration configuration = this.surface.getConfiguration();
    if (this.isButtonCombination(ButtonID.DELETE) && configuration.isDeleteModeActive()) {
        configuration.toggleDeleteModeActive();
        return true;
    }
    if (this.isButtonCombination(ButtonID.DUPLICATE) && configuration.isDuplicateModeActive() && (!slot.doesExist() || !slot.hasContent())) {
        configuration.toggleDuplicateModeActive();
        return true;
    }
    return false;
}
Also used : FireConfiguration(de.mossgrabers.controller.akai.fire.FireConfiguration)

Example 4 with FireConfiguration

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

the class MixView method onGridNote.

/**
 * {@inheritDoc}
 */
@Override
public void onGridNote(final int note, final int velocity) {
    if (velocity == 0)
        return;
    final int n = note - 36;
    final int index = n % 16;
    final int what = n / 16;
    final ITrack track = this.model.getCurrentTrackBank().getItem(index);
    switch(what) {
        case 3:
            final FireConfiguration configuration = this.surface.getConfiguration();
            if (configuration.isDeleteModeActive()) {
                configuration.toggleDeleteModeActive();
                track.remove();
            } else if (configuration.isDuplicateModeActive()) {
                configuration.toggleDuplicateModeActive();
                track.duplicate();
            } else
                track.select();
            break;
        case 2:
            track.toggleMute();
            break;
        case 1:
            track.toggleSolo();
            break;
        case 0:
            track.toggleRecArm();
            break;
        default:
            // Not used
            break;
    }
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) FireConfiguration(de.mossgrabers.controller.akai.fire.FireConfiguration)

Aggregations

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