Search in sources :

Example 16 with ITextDisplay

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

use of de.mossgrabers.framework.controller.display.ITextDisplay in project DrivenByMoss by git-moss.

the class TempoMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay().clear();
    final ITransport transport = this.model.getTransport();
    final double tempo = transport.getTempo();
    d.setCell(0, 0, "Tempo:").setBlock(0, 1, String.format("> %.02f", Double.valueOf(tempo)));
    d.setBlock(0, 2, "Time:").setBlock(0, 3, "  " + transport.getPositionText());
    d.setBlock(1, 2, "Position:").setBlock(1, 3, "  " + transport.getBeatText());
    d.allDone();
}
Also used : ITransport(de.mossgrabers.framework.daw.ITransport) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay)

Example 18 with ITextDisplay

use of de.mossgrabers.framework.controller.display.ITextDisplay in project DrivenByMoss by git-moss.

the class LaunchkeyMk3SendMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay();
    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";
    final ITrackBank tb = this.model.getCurrentTrackBank();
    if (this.areKnobs) {
        String sendName = tb.getEditSendName(this.sendIndex);
        sendName = StringUtils.optimizeName(sendName.isEmpty() ? "Send " + (this.sendIndex + 1) : sendName, 6);
        d.setCell(LaunchkeyMk3Display.SCREEN_ROW_BASE, 0, sendName + this.formatPageRange(" %d - %d"));
        d.setCell(LaunchkeyMk3Display.SCREEN_ROW_BASE + 1, 0, trackText);
    }
    final int row = this.areKnobs ? LaunchkeyMk3Display.SCREEN_ROW_POTS : LaunchkeyMk3Display.SCREEN_ROW_FADERS;
    // Format track names
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(i);
        final ISend s = t.getSendBank().getItem(this.sendIndex);
        final boolean exists = s.doesExist();
        final int offset = i * 2;
        d.setCell(row + offset, 0, exists ? String.format("%d: %s", Integer.valueOf(s.getPosition() + 1), s.getName()) : "No send");
        d.setCell(row + offset + 1, 0, exists ? "S-Vol: " + s.getDisplayedValue() : "");
    }
    // Add master fader
    if (!this.areKnobs) {
        final IMasterTrack masterTrack = this.model.getMasterTrack();
        d.setCell(row + 16, 0, "Master");
        d.setCell(row + 16 + 1, 0, "Vol: " + masterTrack.getVolumeStr());
    }
    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) ISend(de.mossgrabers.framework.daw.data.ISend) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack)

Example 19 with ITextDisplay

use of de.mossgrabers.framework.controller.display.ITextDisplay in project DrivenByMoss by git-moss.

the class BrowseMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final IBrowser browser = this.model.getBrowser();
    final ITextDisplay d = this.surface.getTextDisplay();
    final boolean isPresetSession = browser.isPresetContentType();
    final ICursorDevice cd = this.model.getCursorDevice();
    if (isPresetSession && !(browser.isActive() && cd.doesExist())) {
        d.notify("No active Browsing Session. Select device and press Browser...");
        return;
    }
    d.clear();
    for (int i = 0; i < 7; i++) {
        final Optional<IBrowserColumn> column = this.getFilterColumn(i);
        String value = "";
        String name = "";
        if (column.isPresent()) {
            final IBrowserColumn browserColumn = column.get();
            if (browserColumn.doesCursorExist())
                value = browserColumn.getCursorName().equals(browserColumn.getWildcard()) ? "-" : browserColumn.getCursorName();
            name = StringUtils.shortenAndFixASCII(browserColumn.getName(), 6);
        }
        if (i == this.getSelectedParameter())
            name = ">" + name;
        d.setCell(0, i, name).setCell(1, i, value);
    }
    final String selectedResult = browser.getSelectedResult();
    String selectedContentType = browser.getSelectedContentType();
    if (this.getSelectedParameter() == 7)
        selectedContentType = ">" + selectedContentType;
    d.setCell(0, 7, selectedContentType).setCell(1, 7, selectedResult == null || selectedResult.length() == 0 ? "-" : selectedResult);
    d.allDone();
}
Also used : IBrowser(de.mossgrabers.framework.daw.IBrowser) IBrowserColumn(de.mossgrabers.framework.daw.data.IBrowserColumn) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay) ICursorDevice(de.mossgrabers.framework.daw.data.ICursorDevice)

Example 20 with ITextDisplay

use of de.mossgrabers.framework.controller.display.ITextDisplay in project DrivenByMoss by git-moss.

the class MaschineParametersMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay().clear();
    final ICursorDevice cd = this.model.getCursorDevice();
    if (!cd.doesExist()) {
        d.notify("Please select a device...");
        return;
    }
    // Row 1 & 2
    final IParameterBank parameterBank = cd.getParameterBank();
    for (int i = 0; i < 8; i++) {
        final IParameter param = parameterBank.getItem(i);
        String name = param.doesExist() ? StringUtils.shortenAndFixASCII(param.getName(), 6) : "";
        if (i == this.getSelectedParameter())
            name = ">" + name;
        d.setCell(0, i, name).setCell(1, i, StringUtils.shortenAndFixASCII(param.getDisplayedValue(8), 8));
    }
    d.allDone();
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay) IParameterBank(de.mossgrabers.framework.daw.data.bank.IParameterBank) ICursorDevice(de.mossgrabers.framework.daw.data.ICursorDevice)

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