Search in sources :

Example 16 with ITrackBank

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

the class ToggleTrackBanksCommand method executeNormal.

/**
 * {@inheritDoc}
 */
@Override
public void executeNormal(final ButtonEvent event) {
    if (event != ButtonEvent.DOWN)
        return;
    this.model.toggleCurrentTrackBank();
    final ITrackBank currentTrackBank = this.model.getCurrentTrackBank();
    this.surface.getDisplay().notify(this.model.isEffectTrackBankActive() ? "Effect Tracks" : "Audio & Instrument Tracks");
    if (currentTrackBank.getSelectedItem().isEmpty())
        currentTrackBank.getItem(0).select();
}
Also used : ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank)

Example 17 with ITrackBank

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

the class AbstractTrackParameterProvider method addParametersObserver.

/**
 * {@inheritDoc}
 */
@Override
public void addParametersObserver(final IParametersAdjustObserver observer) {
    super.addParametersObserver(observer);
    if (this.model == null) {
        this.bank.addPageObserver(this);
        return;
    }
    // Monitor the instrument/audio and effect track banks
    this.model.getTrackBank().addPageObserver(this);
    final ITrackBank effectTrackBank = this.model.getEffectTrackBank();
    if (effectTrackBank != null)
        effectTrackBank.addPageObserver(this);
}
Also used : ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank)

Example 18 with ITrackBank

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

the class SelectedTrackParameterProvider method removeParametersObserver.

/**
 * {@inheritDoc}
 */
@Override
public void removeParametersObserver(final IParametersAdjustObserver observer) {
    super.removeParametersObserver(observer);
    if (this.hasObservers())
        return;
    if (this.model == null) {
        this.bank.removeSelectionObserver(this);
        return;
    }
    this.model.getTrackBank().removeSelectionObserver(this);
    final ITrackBank effectTrackBank = this.model.getEffectTrackBank();
    if (effectTrackBank != null)
        effectTrackBank.removeSelectionObserver(this);
}
Also used : ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank)

Example 19 with ITrackBank

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

the class SelectedTrackParameterProvider method addParametersObserver.

/**
 * {@inheritDoc}
 */
@Override
public void addParametersObserver(final IParametersAdjustObserver observer) {
    super.addParametersObserver(observer);
    if (this.model == null) {
        this.bank.addSelectionObserver(this);
        return;
    }
    this.model.getTrackBank().addSelectionObserver(this);
    final ITrackBank effectTrackBank = this.model.getEffectTrackBank();
    if (effectTrackBank != null)
        effectTrackBank.addSelectionObserver(this);
}
Also used : ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank)

Example 20 with ITrackBank

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

the class ShiftView method getTrackButtonColor.

/**
 * {@inheritDoc}
 */
@Override
public int getTrackButtonColor(final int index) {
    final ITrackBank tb = this.model.getCurrentTrackBank();
    final ISceneBank sceneBank = tb.getSceneBank();
    final Modes mode = this.surface.getModeManager().getActiveID();
    switch(index) {
        case 0:
            return sceneBank.canScrollPageBackwards() ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
        case 1:
            return sceneBank.canScrollPageForwards() ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
        case 2:
            return tb.canScrollPageBackwards() ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
        case 3:
            return tb.canScrollPageForwards() ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
        case 4:
            return Modes.VOLUME.equals(mode) ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
        case 5:
            return Modes.PAN.equals(mode) ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
        case 6:
            return Modes.isSendMode(mode) ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
        case 7:
            return Modes.DEVICE_PARAMS.equals(mode) ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
        default:
            // Never reached
            break;
    }
    return APCminiColorManager.APC_COLOR_BLACK;
}
Also used : ISceneBank(de.mossgrabers.framework.daw.data.bank.ISceneBank) Modes(de.mossgrabers.framework.mode.Modes) 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