Search in sources :

Example 41 with ITextDisplay

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

the class LoopStartMode 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 42 with ITextDisplay

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

the class PositionMode 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 43 with ITextDisplay

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

the class EditNoteMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay().clear();
    if (this.notes.isEmpty()) {
        d.setBlock(0, 0, "Please select");
        d.setBlock(0, 1, "a note...");
        d.allDone();
        return;
    }
    final GridStep noteInfo = this.notes.get(0);
    final int channel = noteInfo.channel();
    final int step = noteInfo.step();
    final int note = noteInfo.note();
    final IStepInfo stepInfo = this.clip.getStep(channel, step, note);
    d.setCell(0, 0, "Note");
    if (this.notes.size() > 1)
        d.setCell(1, 0, "*:" + this.notes.size());
    else
        d.setCell(1, 0, stepInfo == null ? "-" : Integer.toString(step + 1) + ":" + Scales.formatNoteAndOctave(note, -3));
    d.setCell(0, 1, this.mark("Length", DURATION + this.selectedPage * 10));
    if (stepInfo == null)
        d.setCell(1, 2, "-");
    else {
        final String[] formatLength = this.formatLength(stepInfo.getDuration()).split(":");
        d.setCell(1, 1, formatLength[0]);
        d.setCell(1, 2, ":" + formatLength[1]);
    }
    switch(this.selectedPage) {
        default:
        case PAGE_NOTE:
            d.setCell(0, 3, this.mark("Velocity", VELOCITY)).setCell(1, 3, stepInfo == null ? "-" : StringUtils.formatPercentage(stepInfo.getVelocity()));
            if (this.host.supports(Capability.NOTE_EDIT_VELOCITY_SPREAD))
                d.setCell(0, 4, this.mark("Spread", VELOCITY_SPREAD)).setCell(1, 4, stepInfo == null ? "-" : StringUtils.formatPercentage(stepInfo.getVelocitySpread()));
            if (this.host.supports(Capability.NOTE_EDIT_RELEASE_VELOCITY))
                d.setCell(0, 5, this.mark("R-Vel", RELEASE_VELOCITY)).setCell(1, 5, stepInfo == null ? "-" : StringUtils.formatPercentage(stepInfo.getReleaseVelocity()));
            if (this.host.supports(Capability.NOTE_EDIT_CHANCE))
                d.setCell(0, 6, this.mark("Chance", CHANCE)).setCell(1, 6, stepInfo == null ? "-" : StringUtils.formatPercentage(stepInfo.getChance()));
            if (this.host.supports(Capability.NOTE_EDIT_OCCURRENCE))
                d.setCell(0, 7, this.mark("Occurnce", OCCURRENCE)).setCell(1, 7, stepInfo == null ? "-" : StringUtils.optimizeName(stepInfo.getOccurrence().getName(), 8));
            break;
        case PAGE_EXPRESSIONS:
            d.setCell(0, 3, this.mark("Gain", GAIN)).setCell(1, 3, stepInfo == null ? "-" : StringUtils.formatPercentage(stepInfo.getGain()));
            d.setCell(0, 4, this.mark("Pan", PANORAMA)).setCell(1, 4, stepInfo == null ? "-" : StringUtils.formatPercentage(stepInfo.getPan()));
            d.setCell(0, 5, this.mark("Pitch", PITCH)).setCell(1, 5, stepInfo == null ? "-" : String.format("%.1f", Double.valueOf(stepInfo.getTranspose())));
            d.setCell(0, 6, this.mark("Timbre", TIMBRE)).setCell(1, 6, stepInfo == null ? "-" : StringUtils.formatPercentage(stepInfo.getTimbre()));
            d.setCell(0, 7, this.mark("Pressure", PRESSURE)).setCell(1, 7, stepInfo == null ? "-" : StringUtils.formatPercentage(stepInfo.getPressure()));
            break;
        case PAGE_REPEAT:
            d.setCell(0, 3, this.mark("Velocity", VELOCITY2)).setCell(1, 3, stepInfo == null ? "-" : StringUtils.formatPercentage(stepInfo.getVelocity()));
            d.setCell(0, 4, this.mark("V-End", VELOCITY_END)).setCell(1, 4, stepInfo == null ? "-" : StringUtils.formatPercentage(stepInfo.getRepeatVelocityEnd()));
            d.setCell(0, 5, this.mark("V-Curve", VELOCITY_CURVE)).setCell(1, 5, stepInfo == null ? "-" : StringUtils.formatPercentage(stepInfo.getRepeatVelocityCurve()));
            d.setCell(0, 6, this.mark("Count", COUNT)).setCell(1, 6, stepInfo == null ? "-" : stepInfo.getFormattedRepeatCount());
            d.setCell(0, 7, this.mark("Curve", CURVE)).setCell(1, 7, stepInfo == null ? "-" : StringUtils.formatPercentage(stepInfo.getRepeatCurve()));
            break;
    }
    d.allDone();
}
Also used : ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay) GridStep(de.mossgrabers.framework.daw.data.GridStep) IStepInfo(de.mossgrabers.framework.daw.IStepInfo)

Example 44 with ITextDisplay

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

the class DrumConfigurationMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay().clear();
    final Scales scales = this.model.getScales();
    final int octave = scales.getDrumOffset();
    d.setBlock(0, 3, this.mark("Drum Offset", 6)).setBlock(1, 3, (octave > 0 ? "+" : "") + Integer.toString(octave));
    d.allDone();
}
Also used : ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay) Scales(de.mossgrabers.framework.scale.Scales)

Example 45 with ITextDisplay

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

the class CustomMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay();
    d.setCell(LaunchkeyMk3Display.SCREEN_ROW_BASE, 0, "Custom mode " + this.number);
    d.setCell(LaunchkeyMk3Display.SCREEN_ROW_BASE + 1, 0, "");
    d.allDone();
}
Also used : 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