Search in sources :

Example 1 with ITrackBank

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

the class PanSendCommand method execute.

/**
 * {@inheritDoc}
 */
@Override
public void execute(final ButtonEvent event, final int velocity) {
    if (event != ButtonEvent.DOWN)
        return;
    final ModeManager modeManager = this.surface.getModeManager();
    final Modes currentMode = modeManager.getActiveID();
    // Layer mode selection for Push 1
    Modes mode;
    final PushConfiguration config = this.surface.getConfiguration();
    if (!config.isPush2() && this.surface.isSelectPressed() && Modes.isLayerMode(currentMode)) {
        if (this.model.isEffectTrackBankActive()) {
            // No Sends on FX tracks
            mode = Modes.DEVICE_LAYER_PAN;
        } else {
            mode = Modes.get(currentMode, 1);
            // Wrap
            if (mode.ordinal() < Modes.DEVICE_LAYER_PAN.ordinal() || mode.ordinal() > Modes.DEVICE_LAYER_SEND8.ordinal())
                mode = Modes.DEVICE_LAYER_PAN;
            // Check if Send channel exists
            final ITrackBank tb = this.model.getTrackBank();
            if (mode.ordinal() < Modes.DEVICE_LAYER_SEND1.ordinal() || mode.ordinal() > Modes.DEVICE_LAYER_SEND8.ordinal() || tb.canEditSend(mode.ordinal() - Modes.DEVICE_LAYER_SEND1.ordinal()))
                mode = Modes.DEVICE_LAYER_PAN;
        }
        modeManager.setActive(mode);
        return;
    }
    if (this.model.isEffectTrackBankActive()) {
        // No Sends on FX tracks
        mode = Modes.PAN;
    } else {
        if (currentMode.ordinal() < Modes.SEND1.ordinal() || currentMode.ordinal() > Modes.SEND8.ordinal())
            mode = Modes.SEND1;
        else {
            mode = Modes.get(currentMode, 1);
            if (mode.ordinal() > Modes.SEND8.ordinal())
                mode = Modes.PAN;
        }
        // Check if Send channel exists
        final ITrackBank tb = this.model.getTrackBank();
        if (mode.ordinal() < Modes.SEND1.ordinal() || mode.ordinal() > Modes.SEND8.ordinal() || !tb.canEditSend(mode.ordinal() - Modes.SEND1.ordinal()))
            mode = Modes.PAN;
    }
    modeManager.setActive(mode);
}
Also used : Modes(de.mossgrabers.framework.mode.Modes) PushConfiguration(de.mossgrabers.controller.ableton.push.PushConfiguration) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ModeManager(de.mossgrabers.framework.featuregroup.ModeManager)

Example 2 with ITrackBank

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

the class TrackEditing method onTrackKnob.

/**
 * A knob is moved for changing a track parameter.
 *
 * @param index The index of the knob
 * @param value The knobs value
 * @param isTurnedRight The knob is turned to the right (positive value change)
 */
public void onTrackKnob(final int index, final int value, final boolean isTurnedRight) {
    final ITrackBank tb = this.model.getCurrentTrackBank();
    final Optional<ITrack> selectedTrack = tb.getSelectedItem();
    if (selectedTrack.isEmpty())
        return;
    switch(index) {
        case 0:
            selectedTrack.get().changeVolume(value);
            break;
        case 1:
            selectedTrack.get().changePan(value);
            break;
        case 2:
            selectedTrack.get().setMute(isTurnedRight);
            break;
        case 3:
            selectedTrack.get().setSolo(isTurnedRight);
            break;
        case 4:
            selectedTrack.get().getCrossfadeParameter().changeValue(value);
            break;
        case 5:
            this.model.getTransport().changeTempo(isTurnedRight, this.surface.isShiftPressed());
            break;
        case 6:
            this.model.getTransport().changePosition(isTurnedRight, this.surface.isShiftPressed());
            break;
        case 7:
            this.model.getMasterTrack().changeVolume(value);
            break;
        // Send 1 - 4
        case 8:
        case 9:
        case 10:
        case 11:
            if (!this.model.isEffectTrackBankActive())
                selectedTrack.get().getSendBank().getItem(index - 8).changeValue(value);
            break;
        default:
            // Not used
            break;
    }
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank)

Example 3 with ITrackBank

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

the class GenericFlexiControllerSetup method updateIndication.

protected void updateIndication() {
    final Set<FlexiCommand> commands = this.configuration.getMappedCommands();
    final FlexiCommand[] allCommands = FlexiCommand.values();
    final ITrackBank trackBank = this.model.getTrackBank();
    final Optional<ITrack> selectedTrack = trackBank.getSelectedItem();
    for (int i = 0; i < trackBank.getPageSize(); i++) {
        final boolean hasTrackSel = selectedTrack.isPresent() && selectedTrack.get().getIndex() == i;
        final ITrack track = trackBank.getItem(i);
        track.setVolumeIndication(this.testVolumeIndication(commands, allCommands, i, hasTrackSel));
        track.setPanIndication(this.testPanIndication(commands, allCommands, i, hasTrackSel));
        final ISendBank sendBank = track.getSendBank();
        final int sendPageSize = sendBank.getPageSize();
        for (int j = 0; j < sendPageSize; j++) sendBank.getItem(j).setIndication(this.testSendIndication(commands, allCommands, i, hasTrackSel, sendPageSize, j));
    }
    final IMasterTrack masterTrack = this.model.getMasterTrack();
    masterTrack.setVolumeIndication(commands.contains(FlexiCommand.MASTER_SET_VOLUME));
    masterTrack.setPanIndication(commands.contains(FlexiCommand.MASTER_SET_PANORAMA));
    final IParameterBank parameterBank = this.model.getCursorDevice().getParameterBank();
    for (int i = 0; i < parameterBank.getPageSize(); i++) parameterBank.getItem(i).setIndication(this.testParameterIndication(commands, allCommands, i));
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) IParameterBank(de.mossgrabers.framework.daw.data.bank.IParameterBank) FlexiCommand(de.mossgrabers.controller.generic.controller.FlexiCommand) ISendBank(de.mossgrabers.framework.daw.data.bank.ISendBank) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack)

Example 4 with ITrackBank

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

the class GenericFlexiControllerSetup method createObservers.

/**
 * {@inheritDoc}
 */
@Override
protected void createObservers() {
    super.createObservers();
    final GenericFlexiControlSurface surface = this.getSurface();
    this.configuration.addSettingObserver(GenericFlexiConfiguration.SLOT_CHANGE, surface::updateKeyTranslation);
    this.configuration.addSettingObserver(GenericFlexiConfiguration.SELECTED_MODE, this::selectMode);
    final ITrackBank trackBank = this.model.getTrackBank();
    trackBank.addSelectionObserver((index, selected) -> this.handleTrackChange(selected));
    final ITrackBank effectTrackBank = this.model.getEffectTrackBank();
    if (effectTrackBank != null)
        effectTrackBank.addSelectionObserver((index, selected) -> this.handleTrackChange(selected));
    surface.getModeManager().addChangeListener((oldMode, newMode) -> this.updateIndication());
    // Handle configuration changes
    this.createNoteRepeatObservers(this.configuration, surface);
    this.configuration.registerDeactivatedItemsHandler(this.model);
    this.configuration.addSettingObserver(GenericFlexiConfiguration.ENABLED_MPE_ZONES, () -> surface.scheduleTask(() -> {
        final INoteInput input = surface.getMidiInput().getDefaultNoteInput();
        final IMidiOutput output = surface.getMidiOutput();
        final boolean mpeEnabled = this.configuration.isMPEEndabled();
        input.enableMPE(mpeEnabled);
        // Enable MPE zone 1 with all 15 channels
        output.configureMPE(AbstractMidiOutput.ZONE_1, mpeEnabled ? 15 : 0);
        // Disable MPE zone
        output.configureMPE(AbstractMidiOutput.ZONE_2, 0);
    }, 2000));
    this.configuration.addSettingObserver(GenericFlexiConfiguration.MPE_PITCHBEND_RANGE, () -> surface.scheduleTask(() -> {
        final INoteInput input = surface.getMidiInput().getDefaultNoteInput();
        final IMidiOutput output = surface.getMidiOutput();
        final int mpePitchBendRange = this.configuration.getMPEPitchBendRange();
        input.setMPEPitchBendSensitivity(mpePitchBendRange);
        output.sendMPEPitchbendRange(AbstractMidiOutput.ZONE_1, mpePitchBendRange);
    }, 2000));
    this.activateBrowserObserver(Modes.BROWSER);
}
Also used : GenericFlexiControlSurface(de.mossgrabers.controller.generic.controller.GenericFlexiControlSurface) ModesHandler(de.mossgrabers.controller.generic.flexihandler.ModesHandler) SignedBitRelativeValueChanger(de.mossgrabers.framework.controller.valuechanger.SignedBitRelativeValueChanger) TwosComplementValueChanger(de.mossgrabers.framework.controller.valuechanger.TwosComplementValueChanger) ITrack(de.mossgrabers.framework.daw.data.ITrack) TrackSendMode(de.mossgrabers.framework.mode.track.TrackSendMode) DeviceID(de.mossgrabers.framework.daw.constants.DeviceID) AbstractControllerSetup(de.mossgrabers.framework.controller.AbstractControllerSetup) IEnumSetting(de.mossgrabers.framework.configuration.IEnumSetting) INoteInput(de.mossgrabers.framework.daw.midi.INoteInput) BrowserMode(de.mossgrabers.framework.mode.device.BrowserMode) GenericFlexiControlSurface(de.mossgrabers.controller.generic.controller.GenericFlexiControlSurface) Locale(java.util.Locale) MasterHandler(de.mossgrabers.controller.generic.flexihandler.MasterHandler) ProgramBank(de.mossgrabers.controller.generic.flexihandler.utils.ProgramBank) ParseException(java.text.ParseException) IValueObserver(de.mossgrabers.framework.observer.IValueObserver) FxTrackHandler(de.mossgrabers.controller.generic.flexihandler.FxTrackHandler) DeviceHandler(de.mossgrabers.controller.generic.flexihandler.DeviceHandler) Modes(de.mossgrabers.framework.mode.Modes) ModeManager(de.mossgrabers.framework.featuregroup.ModeManager) TrackHandler(de.mossgrabers.controller.generic.flexihandler.TrackHandler) Set(java.util.Set) IValueChanger(de.mossgrabers.framework.controller.valuechanger.IValueChanger) EqHandler(de.mossgrabers.controller.generic.flexihandler.EqHandler) ClipHandler(de.mossgrabers.controller.generic.flexihandler.ClipHandler) ISettingsUI(de.mossgrabers.framework.configuration.ISettingsUI) List(java.util.List) ActionHandler(de.mossgrabers.controller.generic.flexihandler.ActionHandler) UserHandler(de.mossgrabers.controller.generic.flexihandler.UserHandler) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) Optional(java.util.Optional) FileEx(de.mossgrabers.framework.utils.FileEx) TransportHandler(de.mossgrabers.controller.generic.flexihandler.TransportHandler) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) FlexiCommand(de.mossgrabers.controller.generic.controller.FlexiCommand) MidiCCHandler(de.mossgrabers.controller.generic.flexihandler.MidiCCHandler) ISetupFactory(de.mossgrabers.framework.controller.ISetupFactory) OffsetBinaryRelativeValueChanger(de.mossgrabers.framework.controller.valuechanger.OffsetBinaryRelativeValueChanger) TrackVolumeMode(de.mossgrabers.framework.mode.track.TrackVolumeMode) ModelSetup(de.mossgrabers.framework.daw.ModelSetup) TrackPanMode(de.mossgrabers.framework.mode.track.TrackPanMode) Scales(de.mossgrabers.framework.scale.Scales) AbstractMidiOutput(de.mossgrabers.framework.daw.midi.AbstractMidiOutput) ArrayList(java.util.ArrayList) MarkerHandler(de.mossgrabers.controller.generic.flexihandler.MarkerHandler) LayoutHandler(de.mossgrabers.controller.generic.flexihandler.LayoutHandler) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack) IHost(de.mossgrabers.framework.daw.IHost) ParameterMode(de.mossgrabers.framework.mode.device.ParameterMode) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IOException(java.io.IOException) NoteInputHandler(de.mossgrabers.controller.generic.flexihandler.NoteInputHandler) ISendBank(de.mossgrabers.framework.daw.data.bank.ISendBank) IParameterBank(de.mossgrabers.framework.daw.data.bank.IParameterBank) BrowserHandler(de.mossgrabers.controller.generic.flexihandler.BrowserHandler) SceneHandler(de.mossgrabers.controller.generic.flexihandler.SceneHandler) ColorManager(de.mossgrabers.framework.controller.color.ColorManager) TrackMode(de.mossgrabers.framework.mode.track.TrackMode) Collections(java.util.Collections) GlobalHandler(de.mossgrabers.controller.generic.flexihandler.GlobalHandler) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) INoteInput(de.mossgrabers.framework.daw.midi.INoteInput)

Example 5 with ITrackBank

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

the class FxTrackHandler method handle.

/**
 * {@inheritDoc}
 */
@Override
public void handle(final FlexiCommand command, final KnobMode knobMode, final MidiValue value) {
    final ITrackBank effectTrackBank = this.model.getEffectTrackBank();
    if (effectTrackBank == null)
        return;
    final boolean isButtonPressed = this.isButtonPressed(knobMode, value);
    switch(command) {
        // Track: Select Previous Bank Page
        case FX_TRACK_SELECT_PREVIOUS_BANK_PAGE:
            if (isButtonPressed)
                this.scrollTrackLeft(true);
            break;
        // Track: Select Next Bank Page
        case FX_TRACK_SELECT_NEXT_BANK_PAGE:
            if (isButtonPressed)
                this.scrollTrackRight(true);
            break;
        // Track: Select Previous Track
        case FX_TRACK_SELECT_PREVIOUS_TRACK:
            if (isButtonPressed)
                this.scrollTrackLeft(false);
            break;
        // Track: Select Next Track
        case FX_TRACK_SELECT_NEXT_TRACK:
            if (isButtonPressed)
                this.scrollTrackRight(false);
            break;
        case FX_TRACK_SCROLL_TRACKS:
            this.scrollTrack(knobMode, value);
            break;
        // Track 1-8: Select
        case FX_TRACK_1_SELECT:
        case FX_TRACK_2_SELECT:
        case FX_TRACK_3_SELECT:
        case FX_TRACK_4_SELECT:
        case FX_TRACK_5_SELECT:
        case FX_TRACK_6_SELECT:
        case FX_TRACK_7_SELECT:
        case FX_TRACK_8_SELECT:
            if (isButtonPressed) {
                final ITrack track = effectTrackBank.getItem(command.ordinal() - FlexiCommand.FX_TRACK_1_SELECT.ordinal());
                track.select();
                this.mvHelper.notifySelectedTrack();
            }
            break;
        // Track 1-8: Toggle Active
        case FX_TRACK_1_TOGGLE_ACTIVE:
        case FX_TRACK_2_TOGGLE_ACTIVE:
        case FX_TRACK_3_TOGGLE_ACTIVE:
        case FX_TRACK_4_TOGGLE_ACTIVE:
        case FX_TRACK_5_TOGGLE_ACTIVE:
        case FX_TRACK_6_TOGGLE_ACTIVE:
        case FX_TRACK_7_TOGGLE_ACTIVE:
        case FX_TRACK_8_TOGGLE_ACTIVE:
            if (isButtonPressed)
                effectTrackBank.getItem(command.ordinal() - FlexiCommand.FX_TRACK_1_TOGGLE_ACTIVE.ordinal()).toggleIsActivated();
            break;
        // Track 1-8: Set Active
        case FX_TRACK_1_SET_ACTIVE:
        case FX_TRACK_2_SET_ACTIVE:
        case FX_TRACK_3_SET_ACTIVE:
        case FX_TRACK_4_SET_ACTIVE:
        case FX_TRACK_5_SET_ACTIVE:
        case FX_TRACK_6_SET_ACTIVE:
        case FX_TRACK_7_SET_ACTIVE:
        case FX_TRACK_8_SET_ACTIVE:
            if (isButtonPressed)
                effectTrackBank.getItem(command.ordinal() - FlexiCommand.FX_TRACK_1_SET_ACTIVE.ordinal()).setIsActivated(value.isPositive());
            break;
        // Track 1-8: Set Volume
        case FX_TRACK_1_SET_VOLUME:
        case FX_TRACK_2_SET_VOLUME:
        case FX_TRACK_3_SET_VOLUME:
        case FX_TRACK_4_SET_VOLUME:
        case FX_TRACK_5_SET_VOLUME:
        case FX_TRACK_6_SET_VOLUME:
        case FX_TRACK_7_SET_VOLUME:
        case FX_TRACK_8_SET_VOLUME:
            this.changeTrackVolume(knobMode, command.ordinal() - FlexiCommand.FX_TRACK_1_SET_VOLUME.ordinal(), value);
            break;
        // Track 1-8: Set Panorama
        case FX_TRACK_1_SET_PANORAMA:
        case FX_TRACK_2_SET_PANORAMA:
        case FX_TRACK_3_SET_PANORAMA:
        case FX_TRACK_4_SET_PANORAMA:
        case FX_TRACK_5_SET_PANORAMA:
        case FX_TRACK_6_SET_PANORAMA:
        case FX_TRACK_7_SET_PANORAMA:
        case FX_TRACK_8_SET_PANORAMA:
            this.changeTrackPanorama(knobMode, command.ordinal() - FlexiCommand.FX_TRACK_1_SET_PANORAMA.ordinal(), value);
            break;
        // Track 1-8: Toggle Mute
        case FX_TRACK_1_TOGGLE_MUTE:
        case FX_TRACK_2_TOGGLE_MUTE:
        case FX_TRACK_3_TOGGLE_MUTE:
        case FX_TRACK_4_TOGGLE_MUTE:
        case FX_TRACK_5_TOGGLE_MUTE:
        case FX_TRACK_6_TOGGLE_MUTE:
        case FX_TRACK_7_TOGGLE_MUTE:
        case FX_TRACK_8_TOGGLE_MUTE:
            if (isButtonPressed)
                effectTrackBank.getItem(command.ordinal() - FlexiCommand.FX_TRACK_1_TOGGLE_MUTE.ordinal()).toggleMute();
            break;
        // Track 1-8: Set Mute
        case FX_TRACK_1_SET_MUTE:
        case FX_TRACK_2_SET_MUTE:
        case FX_TRACK_3_SET_MUTE:
        case FX_TRACK_4_SET_MUTE:
        case FX_TRACK_5_SET_MUTE:
        case FX_TRACK_6_SET_MUTE:
        case FX_TRACK_7_SET_MUTE:
        case FX_TRACK_8_SET_MUTE:
            if (isButtonPressed)
                effectTrackBank.getItem(command.ordinal() - FlexiCommand.FX_TRACK_1_SET_MUTE.ordinal()).setMute(value.isPositive());
            break;
        // Track 1-8: Toggle Solo
        case FX_TRACK_1_TOGGLE_SOLO:
        case FX_TRACK_2_TOGGLE_SOLO:
        case FX_TRACK_3_TOGGLE_SOLO:
        case FX_TRACK_4_TOGGLE_SOLO:
        case FX_TRACK_5_TOGGLE_SOLO:
        case FX_TRACK_6_TOGGLE_SOLO:
        case FX_TRACK_7_TOGGLE_SOLO:
        case FX_TRACK_8_TOGGLE_SOLO:
            if (isButtonPressed)
                effectTrackBank.getItem(command.ordinal() - FlexiCommand.FX_TRACK_1_TOGGLE_SOLO.ordinal()).toggleSolo();
            break;
        // Track 1-8: Set Solo
        case FX_TRACK_1_SET_SOLO:
        case FX_TRACK_2_SET_SOLO:
        case FX_TRACK_3_SET_SOLO:
        case FX_TRACK_4_SET_SOLO:
        case FX_TRACK_5_SET_SOLO:
        case FX_TRACK_6_SET_SOLO:
        case FX_TRACK_7_SET_SOLO:
        case FX_TRACK_8_SET_SOLO:
            if (isButtonPressed)
                effectTrackBank.getItem(command.ordinal() - FlexiCommand.FX_TRACK_1_SET_SOLO.ordinal()).setSolo(value.isPositive());
            break;
        // Track 1-8: Toggle Arm
        case FX_TRACK_1_TOGGLE_ARM:
        case FX_TRACK_2_TOGGLE_ARM:
        case FX_TRACK_3_TOGGLE_ARM:
        case FX_TRACK_4_TOGGLE_ARM:
        case FX_TRACK_5_TOGGLE_ARM:
        case FX_TRACK_6_TOGGLE_ARM:
        case FX_TRACK_7_TOGGLE_ARM:
        case FX_TRACK_8_TOGGLE_ARM:
            if (isButtonPressed)
                effectTrackBank.getItem(command.ordinal() - FlexiCommand.FX_TRACK_1_TOGGLE_ARM.ordinal()).toggleRecArm();
            break;
        // Track 1-8: Set Arm
        case FX_TRACK_1_SET_ARM:
        case FX_TRACK_2_SET_ARM:
        case FX_TRACK_3_SET_ARM:
        case FX_TRACK_4_SET_ARM:
        case FX_TRACK_5_SET_ARM:
        case FX_TRACK_6_SET_ARM:
        case FX_TRACK_7_SET_ARM:
        case FX_TRACK_8_SET_ARM:
            if (isButtonPressed)
                effectTrackBank.getItem(command.ordinal() - FlexiCommand.FX_TRACK_1_SET_ARM.ordinal()).setRecArm(value.isPositive());
            break;
        // Track 1-8: Toggle Monitor
        case FX_TRACK_1_TOGGLE_MONITOR:
        case FX_TRACK_2_TOGGLE_MONITOR:
        case FX_TRACK_3_TOGGLE_MONITOR:
        case FX_TRACK_4_TOGGLE_MONITOR:
        case FX_TRACK_5_TOGGLE_MONITOR:
        case FX_TRACK_6_TOGGLE_MONITOR:
        case FX_TRACK_7_TOGGLE_MONITOR:
        case FX_TRACK_8_TOGGLE_MONITOR:
            if (isButtonPressed)
                effectTrackBank.getItem(command.ordinal() - FlexiCommand.FX_TRACK_1_TOGGLE_MONITOR.ordinal()).toggleMonitor();
            break;
        // Track 1-8: Set Monitor
        case FX_TRACK_1_SET_MONITOR:
        case FX_TRACK_2_SET_MONITOR:
        case FX_TRACK_3_SET_MONITOR:
        case FX_TRACK_4_SET_MONITOR:
        case FX_TRACK_5_SET_MONITOR:
        case FX_TRACK_6_SET_MONITOR:
        case FX_TRACK_7_SET_MONITOR:
        case FX_TRACK_8_SET_MONITOR:
            if (isButtonPressed)
                effectTrackBank.getItem(command.ordinal() - FlexiCommand.FX_TRACK_1_SET_MONITOR.ordinal()).setMonitor(value.isPositive());
            break;
        // Track 1: Toggle Auto Monitor
        case FX_TRACK_1_TOGGLE_AUTO_MONITOR:
        case FX_TRACK_2_TOGGLE_AUTO_MONITOR:
        case FX_TRACK_3_TOGGLE_AUTO_MONITOR:
        case FX_TRACK_4_TOGGLE_AUTO_MONITOR:
        case FX_TRACK_5_TOGGLE_AUTO_MONITOR:
        case FX_TRACK_6_TOGGLE_AUTO_MONITOR:
        case FX_TRACK_7_TOGGLE_AUTO_MONITOR:
        case FX_TRACK_8_TOGGLE_AUTO_MONITOR:
            if (isButtonPressed)
                effectTrackBank.getItem(command.ordinal() - FlexiCommand.FX_TRACK_1_TOGGLE_AUTO_MONITOR.ordinal()).toggleAutoMonitor();
            break;
        // Track 1: Set Auto Monitor
        case FX_TRACK_1_SET_AUTO_MONITOR:
        case FX_TRACK_2_SET_AUTO_MONITOR:
        case FX_TRACK_3_SET_AUTO_MONITOR:
        case FX_TRACK_4_SET_AUTO_MONITOR:
        case FX_TRACK_5_SET_AUTO_MONITOR:
        case FX_TRACK_6_SET_AUTO_MONITOR:
        case FX_TRACK_7_SET_AUTO_MONITOR:
        case FX_TRACK_8_SET_AUTO_MONITOR:
            if (isButtonPressed)
                effectTrackBank.getItem(command.ordinal() - FlexiCommand.FX_TRACK_1_SET_AUTO_MONITOR.ordinal()).setAutoMonitor(value.isPositive());
            break;
        default:
            throw new FlexiHandlerException(command);
    }
}
Also used : FlexiHandlerException(de.mossgrabers.controller.generic.flexihandler.utils.FlexiHandlerException) ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank)

Aggregations

ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)121 ITrack (de.mossgrabers.framework.daw.data.ITrack)85 ModeManager (de.mossgrabers.framework.featuregroup.ModeManager)17 ITextDisplay (de.mossgrabers.framework.controller.display.ITextDisplay)16 Modes (de.mossgrabers.framework.mode.Modes)15 PushConfiguration (de.mossgrabers.controller.ableton.push.PushConfiguration)10 IPadGrid (de.mossgrabers.framework.controller.grid.IPadGrid)10 ISend (de.mossgrabers.framework.daw.data.ISend)10 ISendBank (de.mossgrabers.framework.daw.data.bank.ISendBank)8 ICursorDevice (de.mossgrabers.framework.daw.data.ICursorDevice)7 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)7 ICursorTrack (de.mossgrabers.framework.daw.data.ICursorTrack)6 IValueChanger (de.mossgrabers.framework.controller.valuechanger.IValueChanger)5 ITransport (de.mossgrabers.framework.daw.ITransport)5 IParameterBank (de.mossgrabers.framework.daw.data.bank.IParameterBank)5 ISceneBank (de.mossgrabers.framework.daw.data.bank.ISceneBank)5 SLMkIIIDisplay (de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIDisplay)4 ColorEx (de.mossgrabers.framework.controller.color.ColorEx)4 Kontrol1Display (de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1Display)3 IHost (de.mossgrabers.framework.daw.IHost)3