Search in sources :

Example 21 with ITextDisplay

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

the class MaschineUserMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay().clear();
    // Row 1 & 2
    for (int i = 0; i < 8; i++) {
        final IParameter param = this.bank.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, param.getDisplayedValue(8));
    }
    d.allDone();
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay)

Example 22 with ITextDisplay

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

the class NoteRepeatMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay().clear();
    final String[] names = Resolution.getNames();
    final int selPeriodIndex = this.getSelectedPeriodIndex();
    d.setBlock(0, 0, this.mark("Period", 0));
    d.setBlock(1, 0, names[selPeriodIndex >= 0 && selPeriodIndex < names.length ? selPeriodIndex : 0]);
    if (this.host.supports(Capability.NOTE_REPEAT_LENGTH)) {
        final int selLengthIndex = this.getSelectedNoteLengthIndex();
        d.setBlock(0, 1, this.mark("Length", 2));
        d.setBlock(1, 1, names[selLengthIndex >= 0 && selLengthIndex < names.length ? selLengthIndex : 0]);
    }
    if (this.host.supports(Capability.NOTE_REPEAT_MODE)) {
        final ArpeggiatorMode mode = this.noteRepeat.getMode();
        d.setBlock(0, 2, this.mark("Mode", 4));
        d.setBlock(1, 2, StringUtils.optimizeName(mode.getName(), 12));
    }
    if (this.host.supports(Capability.NOTE_REPEAT_OCTAVES)) {
        final int octaves = this.noteRepeat.getOctaves();
        d.setBlock(0, 3, this.mark("Octaves", 6));
        d.setBlock(1, 3, Integer.toString(octaves));
    }
    d.allDone();
}
Also used : ArpeggiatorMode(de.mossgrabers.framework.daw.midi.ArpeggiatorMode) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay)

Example 23 with ITextDisplay

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

the class LoopLengthMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay().clear();
    final ITransport transport = this.model.getTransport();
    d.setBlock(0, 0, "Arranger Loop");
    d.setBlock(0, 2, "Start:").setBlock(0, 3, "  " + transport.getLoopStartBeatText());
    d.setBlock(1, 2, "Length:").setBlock(1, 3, "> " + transport.getLoopLengthBeatText());
    d.allDone();
}
Also used : ITransport(de.mossgrabers.framework.daw.ITransport) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay)

Example 24 with ITextDisplay

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

the class MaschinePanMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay();
    final ITrackBank tb = this.model.getCurrentTrackBank();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(i);
        String name = StringUtils.shortenAndFixASCII(t.getName(), 6);
        if (t.isSelected())
            name = ">" + name;
        d.setCell(0, i, name);
        d.setCell(1, i, t.getPanStr(6));
    }
    d.allDone();
}
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 25 with ITextDisplay

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

the class MaschineSendMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay();
    final ITrackBank tb = this.model.getCurrentTrackBank();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(i);
        final ISend send = t.getSendBank().getItem(this.sendIndex);
        String name = StringUtils.shortenAndFixASCII(t.getName(), 6);
        if (t.isSelected())
            name = ">" + name;
        d.setCell(0, i, name);
        d.setCell(1, i, send.getDisplayedValue(6));
    }
    d.allDone();
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay) ISend(de.mossgrabers.framework.daw.data.ISend)

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