Search in sources :

Example 26 with ITrackBank

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

the class SendMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    if (!this.surface.getConfiguration().hasDisplay1())
        return;
    if (this.model.isEffectTrackBankActive()) {
        this.surface.getModeManager().setActive(Modes.TRACK);
        return;
    }
    this.drawDisplay2();
    if (!this.drawTrackHeader())
        return;
    final ITextDisplay d = this.surface.getTextDisplay();
    final ITrackBank tb = this.getTrackBank();
    if (!tb.canEditSend(this.sendIndex)) {
        d.notify("Send channel " + (this.sendIndex + 1) + " does not exist.");
        return;
    }
    final int extenderOffset = this.getExtenderOffset();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(extenderOffset + i);
        final ISendBank sendBank = t.getSendBank();
        d.setCell(1, i, this.sendIndex < sendBank.getPageSize() ? sendBank.getItem(this.sendIndex).getDisplayedValue(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) ISendBank(de.mossgrabers.framework.daw.data.bank.ISendBank)

Example 27 with ITrackBank

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

the class SendMode method updateKnobLEDs.

/**
 * {@inheritDoc}
 */
@Override
public void updateKnobLEDs() {
    final ITrackBank tb = this.getTrackBank();
    if (this.model.isEffectTrackBankActive()) {
        this.surface.getModeManager().setActive(Modes.TRACK);
        return;
    }
    final int upperBound = this.model.getValueChanger().getUpperBound();
    final int extenderOffset = this.getExtenderOffset();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(extenderOffset + i);
        final ISendBank sendBank = t.getSendBank();
        this.surface.setKnobLED(i, MCUControlSurface.KNOB_LED_MODE_WRAP, this.sendIndex < sendBank.getPageSize() ? sendBank.getItem(this.sendIndex).getValue() : 0, upperBound);
    }
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ISendBank(de.mossgrabers.framework.daw.data.bank.ISendBank)

Example 28 with ITrackBank

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

the class SendMode method drawTrackHeader.

/**
 * {@inheritDoc}
 */
@Override
protected boolean drawTrackHeader() {
    if (this.model.isEffectTrackBankActive()) {
        this.surface.getModeManager().setActive(Modes.TRACK);
        return true;
    }
    if (!super.drawTrackHeader())
        return false;
    if (this.surface.getConfiguration().isDisplayTrackNames())
        return true;
    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);
        if (t.doesExist()) {
            final ISendBank sendBank = t.getSendBank();
            d.setCell(0, i, StringUtils.shortenAndFixASCII(this.sendIndex < sendBank.getPageSize() ? sendBank.getItem(this.sendIndex).getName(6) : "", 6));
        } else
            d.clearCell(0, i);
    }
    d.done(0);
    return true;
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay) ISendBank(de.mossgrabers.framework.daw.data.bank.ISendBank)

Example 29 with ITrackBank

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

the class AbstractTrackMode method drawTrackHeader.

protected boolean drawTrackHeader() {
    final ITrackBank tb = this.getTrackBank();
    final int extenderOffset = this.getExtenderOffset();
    final ITextDisplay d = this.surface.getTextDisplay().clear();
    // Format track names
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(extenderOffset + i);
        d.setCell(0, i, StringUtils.shortenAndFixASCII(t.getName(), 6));
    }
    d.done(0);
    return true;
}
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 30 with ITrackBank

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

the class PanMode method drawTrackHeader.

/**
 * {@inheritDoc}
 */
@Override
protected boolean drawTrackHeader() {
    if (!super.drawTrackHeader())
        return false;
    if (this.surface.getConfiguration().isDisplayTrackNames())
        return true;
    final ITrackBank tb = this.getTrackBank();
    final ITextDisplay d = this.surface.getTextDisplay();
    final int extenderOffset = this.getExtenderOffset();
    for (int i = 0; i < 8; i++) {
        if (tb.getItem(extenderOffset + i).doesExist())
            d.setCell(0, i, "Pan");
        else
            d.clearCell(0, i);
    }
    d.done(0);
    return true;
}
Also used : ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay)

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