Search in sources :

Example 66 with ITrackBank

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

the class AbstractTrackParameterProvider method removeParametersObserver.

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

Example 67 with ITrackBank

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

the class LaunchkeyMk3PanoramaMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay();
    d.setCell(LaunchkeyMk3Display.SCREEN_ROW_BASE, 0, "Pan   " + this.formatPageRange(" %d - %d"));
    final ICursorTrack cursorTrack = this.model.getCursorTrack();
    final String trackText = cursorTrack.doesExist() ? String.format("%d: %s", Integer.valueOf(cursorTrack.getPosition() + 1), cursorTrack.getName()) : "No sel. track";
    d.setCell(LaunchkeyMk3Display.SCREEN_ROW_BASE + 1, 0, trackText);
    // Format track names
    final ITrackBank tb = this.model.getCurrentTrackBank();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(i);
        final boolean exists = t.doesExist();
        final int offset = i * 2;
        d.setCell(LaunchkeyMk3Display.SCREEN_ROW_POTS + offset, 0, exists ? String.format("%d: %s", Integer.valueOf(t.getPosition() + 1), t.getName()) : "No track");
        d.setCell(LaunchkeyMk3Display.SCREEN_ROW_POTS + offset + 1, 0, exists ? "Pan: " + t.getPanStr() : "");
    }
    d.allDone();
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ICursorTrack(de.mossgrabers.framework.daw.data.ICursorTrack) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay)

Example 68 with ITrackBank

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

the class MuteView method drawGrid.

/**
 * {@inheritDoc}
 */
@Override
public void drawGrid() {
    final IPadGrid padGrid = this.surface.getPadGrid();
    final ITrackBank tb = this.model.getCurrentTrackBank();
    for (int i = 0; i < 16; i++) {
        final ITrack item = tb.getItem(i);
        final int x = i % 4;
        final int y = 3 - i / 4;
        if (item.doesExist()) {
            final int colorIndex = this.colorManager.getColorIndex(DAWColor.getColorIndex(item.getColor()));
            if (item.isMute())
                padGrid.lightEx(x, y, colorIndex, MaschineColorManager.COLOR_DARK_GREY, false);
            else
                padGrid.lightEx(x, y, colorIndex);
        } else
            padGrid.lightEx(x, y, AbstractFeatureGroup.BUTTON_COLOR_OFF);
    }
}
Also used : IPadGrid(de.mossgrabers.framework.controller.grid.IPadGrid) ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank)

Example 69 with ITrackBank

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

the class SessionView method drawGrid.

/**
 * {@inheritDoc}
 */
@Override
public void drawGrid() {
    final ITrackBank tb = this.model.getCurrentTrackBank();
    for (int x = 0; x < 8; x++) {
        final ITrack t = tb.getItem(x);
        final ISlotBank slotBank = t.getSlotBank();
        for (int y = 0; y < 8; y++) this.drawPad(slotBank.getItem(y), x, y, t.isRecArm());
    }
}
Also used : ISlotBank(de.mossgrabers.framework.daw.data.bank.ISlotBank) ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank)

Example 70 with ITrackBank

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

the class TrackButtons method getTrackButtonColor.

/**
 * Update track button LEDs.
 *
 * @param index The index of the button
 * @return The color
 */
public int getTrackButtonColor(final int index) {
    final ITrackBank tb = this.model.getCurrentTrackBank();
    final int trackState = this.surface.getTrackState();
    switch(trackState) {
        case APCminiControlSurface.TRACK_STATE_CLIP_STOP:
            return this.surface.isPressed(ButtonID.get(ButtonID.ROW_SELECT_1, index)) ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
        case APCminiControlSurface.TRACK_STATE_SOLO:
            return tb.getItem(index).isSolo() ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
        case APCminiControlSurface.TRACK_STATE_REC_ARM:
            return tb.getItem(index).isRecArm() ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
        case APCminiControlSurface.TRACK_STATE_MUTE:
            return !tb.getItem(index).isMute() ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
        case APCminiControlSurface.TRACK_STATE_SELECT:
            return tb.getItem(index).isSelected() ? APCminiControlSurface.APC_BUTTON_STATE_ON : APCminiControlSurface.APC_BUTTON_STATE_OFF;
        default:
            // Not used
            return APCminiControlSurface.APC_BUTTON_STATE_OFF;
    }
}
Also used : 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