Search in sources :

Example 11 with ITextDisplay

use of de.mossgrabers.framework.controller.display.ITextDisplay 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 12 with ITextDisplay

use of de.mossgrabers.framework.controller.display.ITextDisplay 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 13 with ITextDisplay

use of de.mossgrabers.framework.controller.display.ITextDisplay 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 14 with ITextDisplay

use of de.mossgrabers.framework.controller.display.ITextDisplay 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)

Example 15 with ITextDisplay

use of de.mossgrabers.framework.controller.display.ITextDisplay 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)

Aggregations

ITextDisplay (de.mossgrabers.framework.controller.display.ITextDisplay)49 ITrack (de.mossgrabers.framework.daw.data.ITrack)16 ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)16 ICursorDevice (de.mossgrabers.framework.daw.data.ICursorDevice)8 IParameter (de.mossgrabers.framework.daw.data.IParameter)6 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)5 IParameterBank (de.mossgrabers.framework.daw.data.bank.IParameterBank)5 IBrowser (de.mossgrabers.framework.daw.IBrowser)4 ITransport (de.mossgrabers.framework.daw.ITransport)4 IBrowserColumn (de.mossgrabers.framework.daw.data.IBrowserColumn)4 ICursorTrack (de.mossgrabers.framework.daw.data.ICursorTrack)4 ISend (de.mossgrabers.framework.daw.data.ISend)4 ISendBank (de.mossgrabers.framework.daw.data.bank.ISendBank)4 IBrowserColumnItem (de.mossgrabers.framework.daw.data.IBrowserColumnItem)3 Scales (de.mossgrabers.framework.scale.Scales)2 IGraphicDisplay (de.mossgrabers.framework.controller.display.IGraphicDisplay)1 IApplication (de.mossgrabers.framework.daw.IApplication)1 IStepInfo (de.mossgrabers.framework.daw.IStepInfo)1 GridStep (de.mossgrabers.framework.daw.data.GridStep)1 IMarker (de.mossgrabers.framework.daw.data.IMarker)1