Search in sources :

Example 31 with ITrackBank

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

the class PanMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    if (!this.surface.getConfiguration().hasDisplay1())
        return;
    this.drawDisplay2();
    if (!this.drawTrackHeader())
        return;
    final ITextDisplay d = this.surface.getTextDisplay();
    final ITrackBank tb = this.getTrackBank();
    final int extenderOffset = this.getExtenderOffset();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(extenderOffset + i);
        d.setCell(1, i, t.getPanStr(6));
    }
    d.done(1);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay)

Example 32 with ITrackBank

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

the class VolumeMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    if (!this.surface.getConfiguration().hasDisplay1())
        return;
    this.drawDisplay2();
    if (!this.drawTrackHeader())
        return;
    final ITextDisplay d = this.surface.getTextDisplay();
    final ITrackBank tb = this.getTrackBank();
    final int extenderOffset = this.getExtenderOffset();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(extenderOffset + i);
        d.setCell(1, i, t.getVolumeStr(6));
    }
    d.done(1);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay)

Example 33 with ITrackBank

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

the class SelectView 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.isSelected())
                padGrid.lightEx(x, y, colorIndex, MaschineColorManager.COLOR_WHITE, 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 34 with ITrackBank

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

the class SoloView 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.isSolo())
                padGrid.lightEx(x, y, colorIndex, MaschineColorManager.COLOR_WHITE, 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 35 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 boolean controlModeIsOff = this.padMode == null;
    this.rows = controlModeIsOff ? 2 : 1;
    super.drawGrid();
    if (controlModeIsOff)
        return;
    final ITrackBank tb = this.model.getCurrentTrackBank();
    final IPadGrid pads = this.surface.getPadGrid();
    for (int x = 0; x < this.columns; x++) {
        final ITrack track = tb.getItem(x);
        final boolean exists = track.doesExist();
        switch(this.padMode) {
            case REC_ARM:
                int recColor = LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_BLACK;
                if (exists)
                    recColor = track.isRecArm() ? LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_RED_HI : LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_RED_LO;
                pads.lightEx(x, 1, recColor);
                break;
            case TRACK_SELECT:
                int selectColor = LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_BLACK;
                if (exists)
                    selectColor = track.isSelected() ? LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_WHITE : LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_GREY_LO;
                pads.lightEx(x, 1, selectColor);
                break;
            case MUTE:
                int muteColor = LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_BLACK;
                if (exists)
                    muteColor = track.isMute() ? LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_AMBER_HI : LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_AMBER_LO;
                pads.lightEx(x, 1, muteColor);
                break;
            case SOLO:
                int soloColor = LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_BLACK;
                if (exists)
                    soloColor = track.isSolo() ? LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_YELLOW_HI : LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_YELLOW_LO;
                pads.lightEx(x, 1, soloColor);
                break;
            case STOP_CLIP:
                pads.lightEx(x, 1, exists ? LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_ROSE : LaunchkeyMiniMk3ColorManager.LAUNCHKEY_COLOR_BLACK);
                break;
            default:
                // Unused
                break;
        }
    }
}
Also used : IPadGrid(de.mossgrabers.framework.controller.grid.IPadGrid) 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