Search in sources :

Example 31 with ISendBank

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

the class SLMkIIITrackMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final SLMkIIIDisplay d = this.surface.getDisplay();
    d.clear();
    d.setCell(0, 8, "Track");
    final ITrack cursorTrack = this.model.getCursorTrack();
    if (!cursorTrack.doesExist()) {
        d.setBlock(1, 1, " Please  select a").setBlock(1, 2, "track.");
        d.setCell(1, 8, "");
        d.hideAllElements();
    } else {
        d.setCell(0, 0, "Volume").setCell(1, 0, cursorTrack.getVolumeStr(9));
        d.setPropertyColor(0, 0, SLMkIIIColorManager.SLMKIII_BLUE);
        d.setPropertyColor(0, 1, SLMkIIIColorManager.SLMKIII_BLUE);
        d.setCell(0, 1, "Pan").setCell(1, 1, cursorTrack.getPanStr(9));
        d.setPropertyColor(1, 0, SLMkIIIColorManager.SLMKIII_ORANGE);
        d.setPropertyColor(1, 1, SLMkIIIColorManager.SLMKIII_ORANGE);
        final ISendBank sendBank = cursorTrack.getSendBank();
        for (int i = 0; i < 6; i++) {
            final int pos = 2 + i;
            int color = SLMkIIIColorManager.SLMKIII_BLACK;
            if (sendBank.getItemCount() > 0) {
                final ISend send = sendBank.getItem(i);
                if (send.doesExist()) {
                    d.setCell(0, pos, send.getName(9)).setCell(1, pos, send.getDisplayedValue(9));
                    color = SLMkIIIColorManager.SLMKIII_YELLOW;
                }
            }
            d.setPropertyColor(pos, 0, color);
            d.setPropertyColor(pos, 1, color);
        }
        d.setCell(1, 8, StringUtils.fixASCII(cursorTrack.getName(9)));
    }
    this.drawRow4();
    this.setButtonInfo(d);
    d.allDone();
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ISend(de.mossgrabers.framework.daw.data.ISend) SLMkIIIDisplay(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIDisplay) ISendBank(de.mossgrabers.framework.daw.data.bank.ISendBank)

Aggregations

ISendBank (de.mossgrabers.framework.daw.data.bank.ISendBank)31 ITrack (de.mossgrabers.framework.daw.data.ITrack)25 ISend (de.mossgrabers.framework.daw.data.ISend)17 ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)8 IGraphicDisplay (de.mossgrabers.framework.controller.display.IGraphicDisplay)4 ITextDisplay (de.mossgrabers.framework.controller.display.ITextDisplay)4 IChannel (de.mossgrabers.framework.daw.data.IChannel)3 ILayer (de.mossgrabers.framework.daw.data.ILayer)3 TitleChannelsComponent (de.mossgrabers.controller.akai.fire.graphics.canvas.component.TitleChannelsComponent)2 TitleValueComponent (de.mossgrabers.controller.akai.fire.graphics.canvas.component.TitleValueComponent)2 IValueChanger (de.mossgrabers.framework.controller.valuechanger.IValueChanger)2 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)2 ISpecificDevice (de.mossgrabers.framework.daw.data.ISpecificDevice)2 IParameterBank (de.mossgrabers.framework.daw.data.bank.IParameterBank)2 ModeManager (de.mossgrabers.framework.featuregroup.ModeManager)2 Modes (de.mossgrabers.framework.mode.Modes)2 PushConfiguration (de.mossgrabers.controller.ableton.push.PushConfiguration)1 BeatstepControlSurface (de.mossgrabers.controller.arturia.beatstep.controller.BeatstepControlSurface)1 FlexiCommand (de.mossgrabers.controller.generic.controller.FlexiCommand)1 Kontrol1Display (de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1Display)1