Search in sources :

Example 6 with Display

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

the class VolumeMode method drawTrackHeader.

/**
 * {@inheritDoc}
 */
@Override
protected boolean drawTrackHeader() {
    if (!super.drawTrackHeader())
        return false;
    if (this.surface.getConfiguration().isDisplayTrackNames())
        return true;
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final Display d = this.surface.getDisplay();
    final int extenderOffset = this.surface.getExtenderOffset();
    for (int i = 0; i < 8; i++) {
        if (tb.getTrack(extenderOffset + i).doesExist())
            d.setCell(0, i, "Volume");
        else
            d.clearCell(0, i);
    }
    d.done(0);
    return true;
}
Also used : IChannelBank(de.mossgrabers.framework.daw.IChannelBank) Display(de.mossgrabers.framework.controller.display.Display)

Example 7 with Display

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

the class BaseMode method drawDisplay2.

protected void drawDisplay2() {
    if (!this.surface.getConfiguration().hasDisplay2())
        return;
    final IChannelBank tb = this.model.getCurrentTrackBank();
    // Format track names
    final Display d2 = this.surface.getSecondDisplay();
    final int extenderOffset = this.surface.getExtenderOffset();
    final boolean isMainDevice = this.surface.isMainDevice();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getTrack(extenderOffset + i);
        d2.setCell(0, i, StringUtils.shortenAndFixASCII(t.getName(), isMainDevice ? 6 : 7));
    }
    if (isMainDevice)
        d2.setCell(0, 8, "Maste");
    d2.done(0);
    d2.clearRow(1);
    if (isMainDevice) {
        final IMasterTrack masterTrack = this.model.getMasterTrack();
        final ICursorDevice cursorDevice = this.model.getCursorDevice();
        final ITrack selectedTrack = masterTrack.isSelected() ? masterTrack : tb.getSelectedTrack();
        d2.setBlock(1, 0, "Sel.track: ").setBlock(1, 1, selectedTrack == null ? "None" : StringUtils.fixASCII(selectedTrack.getName()));
        d2.setBlock(1, 2, "Sel.devce: ").setBlock(1, 3, cursorDevice.hasSelectedDevice() ? cursorDevice.getName() : "None");
    }
    d2.done(1);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack) ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice) Display(de.mossgrabers.framework.controller.display.Display)

Example 8 with Display

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

the class AbstractTrackMode method drawRow4.

protected void drawRow4() {
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final ITrack selTrack = tb.getSelectedTrack();
    // Format track names
    final int selIndex = selTrack == null ? -1 : selTrack.getIndex();
    final Display d = this.surface.getDisplay();
    for (int i = 0; i < 8; i++) {
        final boolean isSel = i == selIndex;
        final ITrack t = tb.getTrack(i);
        final String n = StringUtils.shortenAndFixASCII(t.getName(), isSel ? 7 : 8);
        d.setCell(3, i, isSel ? PushDisplay.RIGHT_ARROW + n : n);
    }
    d.done(3);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) Display(de.mossgrabers.framework.controller.display.Display) PushDisplay(de.mossgrabers.push.controller.PushDisplay)

Example 9 with Display

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

the class ClipMode method updateDisplay1.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay1() {
    final Display d = this.surface.getDisplay();
    final ICursorClip clip = this.model.getCursorClip();
    d.setCell(0, 0, "PlayStrt").setCell(1, 0, this.formatMeasures(clip.getPlayStart(), 1));
    d.setCell(0, 1, "Play End").setCell(1, 1, this.formatMeasures(clip.getPlayEnd(), 1));
    d.setCell(0, 2, "LoopStrt").setCell(1, 2, this.formatMeasures(clip.getLoopStart(), 1));
    d.setCell(0, 3, "LopLngth").setCell(1, 3, this.formatMeasures(clip.getLoopLength(), 0));
    d.setCell(0, 4, "Loop").setCell(1, 4, clip.isLoopEnabled() ? "On" : "Off").clearCell(0, 5).clearCell(1, 5);
    d.setCell(0, 6, "Shuffle").setCell(1, 6, clip.isShuffleEnabled() ? "On" : "Off");
    d.setCell(0, 7, "Accent").setCell(1, 7, clip.getFormattedAccent()).done(0).done(1).clearRow(2).done(2);
    this.drawRow4();
}
Also used : ICursorClip(de.mossgrabers.framework.daw.ICursorClip) Display(de.mossgrabers.framework.controller.display.Display) PushDisplay(de.mossgrabers.push.controller.PushDisplay)

Example 10 with Display

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

the class LayerDetailsMode method updateDisplay1.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay1() {
    final Display d = this.surface.getDisplay();
    final IChannel deviceChain = this.model.getCursorDevice().getSelectedLayerOrDrumPad();
    if (deviceChain == null)
        d.setRow(1, "                     Please selecta layer...                        ").clearRow(0).clearRow(2).done(0).done(2);
    else {
        d.clearRow(0).clearRow(1).setBlock(0, 0, "Layer: " + deviceChain.getName());
        d.setCell(2, 0, "Active").setCell(3, 0, deviceChain.isActivated() ? "On" : "Off");
        d.setCell(2, 1, "");
        d.setCell(3, 1, "");
        d.setCell(2, 2, "Mute").setCell(3, 2, deviceChain.isMute() ? "On" : "Off");
        d.setCell(2, 3, "Solo").setCell(3, 3, deviceChain.isSolo() ? "On" : "Off");
        d.setCell(2, 4, "");
        d.setCell(3, 4, "");
        d.setCell(2, 5, "");
        d.setCell(3, 5, "");
        d.clearCell(2, 6).clearCell(3, 6);
        d.setCell(2, 7, "Select").setCell(3, 7, "Color").done(0).done(1).done(2).done(3);
    }
}
Also used : IChannel(de.mossgrabers.framework.daw.data.IChannel) Display(de.mossgrabers.framework.controller.display.Display) PushDisplay(de.mossgrabers.push.controller.PushDisplay)

Aggregations

Display (de.mossgrabers.framework.controller.display.Display)53 PushDisplay (de.mossgrabers.push.controller.PushDisplay)22 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)18 ITrack (de.mossgrabers.framework.daw.data.ITrack)18 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)10 ISend (de.mossgrabers.framework.daw.data.ISend)6 IChannel (de.mossgrabers.framework.daw.data.IChannel)5 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)4 IParameter (de.mossgrabers.framework.daw.data.IParameter)4 PushConfiguration (de.mossgrabers.push.PushConfiguration)4 SLDisplay (de.mossgrabers.sl.controller.SLDisplay)4 IBrowser (de.mossgrabers.framework.daw.IBrowser)3 IBrowserColumn (de.mossgrabers.framework.daw.data.IBrowserColumn)3 IBrowserColumnItem (de.mossgrabers.framework.daw.data.IBrowserColumnItem)3 ViewManager (de.mossgrabers.framework.view.ViewManager)3 IApplication (de.mossgrabers.framework.daw.IApplication)2 MCUConfiguration (de.mossgrabers.mcu.MCUConfiguration)2 IValueChanger (de.mossgrabers.framework.controller.IValueChanger)1 ICursorClip (de.mossgrabers.framework.daw.ICursorClip)1 ISceneBank (de.mossgrabers.framework.daw.ISceneBank)1