Search in sources :

Example 21 with Display

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

the class SessionMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final Display d = this.surface.getDisplay();
    final ISceneBank sceneBank = this.model.getSceneBank();
    for (int i = 0; i < 8; i++) {
        final IScene scene = sceneBank.getScene(i);
        final String name = StringUtils.fixASCII(scene.getName());
        d.setCell(2, i, name.isEmpty() ? "Scene " + (i + 1) : name);
    }
    d.clearRow(0).done(0).done(2);
}
Also used : ISceneBank(de.mossgrabers.framework.daw.ISceneBank) IScene(de.mossgrabers.framework.daw.data.IScene) Display(de.mossgrabers.framework.controller.display.Display)

Example 22 with Display

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

the class TrackMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final IChannelBank currentTrackBank = this.model.getCurrentTrackBank();
    final ITrack t = currentTrackBank.getSelectedTrack();
    final Display d = this.surface.getDisplay();
    if (t == null) {
        d.setRow(0, "                        Please select a track...                       ").clearRow(2).done(2);
        return;
    }
    d.setCell(0, 0, "Volume").setCell(2, 0, t.getVolumeStr(8)).setCell(0, 1, "Pan").setCell(2, 1, t.getPanStr(8));
    int sendStart = 2;
    int sendCount = 6;
    if (this.surface.getConfiguration().isDisplayCrossfader()) {
        sendStart = 3;
        sendCount = 5;
        final String crossfadeMode = t.getCrossfadeMode();
        d.setCell(0, 2, "Crossfdr").setCell(2, 2, "A".equals(crossfadeMode) ? "A" : "B".equals(crossfadeMode) ? "       B" : "   <> ");
    }
    final IChannelBank fxTrackBank = this.model.getEffectTrackBank();
    int pos;
    if (fxTrackBank != null) {
        final boolean isFX = this.model.isEffectTrackBankActive();
        for (int i = 0; i < sendCount; i++) {
            final ITrack fxTrack = fxTrackBank.getTrack(i);
            final boolean isEmpty = isFX || !fxTrack.doesExist();
            pos = sendStart + i;
            d.setCell(0, pos, isEmpty ? "" : fxTrack.getName()).setCell(2, pos, isEmpty ? "" : t.getSend(i).getDisplayedValue(8));
        }
        if (isFX)
            d.setCell(0, 7, t.getName());
    } else {
        for (int i = 0; i < sendCount; i++) {
            pos = sendStart + i;
            final ISend send = t.getSend(i);
            d.setCell(0, pos, send.getName(8)).setCell(2, pos, send.getDisplayedValue(8));
        }
    }
    d.done(0).done(2);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) ISend(de.mossgrabers.framework.daw.data.ISend) Display(de.mossgrabers.framework.controller.display.Display)

Example 23 with Display

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

the class DeviceParamsMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final Display d = this.surface.getDisplay().clearRow(0).clearRow(2);
    final ICursorDevice cd = this.model.getCursorDevice();
    if (cd.hasSelectedDevice()) {
        for (int i = 0; i < 8; i++) {
            final IParameter param = cd.getFXParam(i);
            d.setCell(0, i, param.doesExist() ? StringUtils.shortenAndFixASCII(param.getName(), 8) : "").setCell(2, i, param.getDisplayedValue(8));
        }
    } else
        d.setRow(0, "                       Please select a device...                       ");
    d.done(0).done(2);
}
Also used : IParameter(de.mossgrabers.framework.daw.data.IParameter) ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice) Display(de.mossgrabers.framework.controller.display.Display)

Example 24 with Display

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

the class DevicePresetsMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final Display d = this.surface.getDisplay();
    if (!this.model.hasSelectedDevice()) {
        d.clearRow(2).done(2).setRow(0, "                       Please select a device...                       ");
        return;
    }
    final IBrowser browser = this.model.getBrowser();
    if (!browser.isActive()) {
        d.setRow(0, "                     No active Browsing Session.                       ").setRow(2, "                        Press Browse again...                          ");
        return;
    }
    d.clear();
    String selectedResult;
    switch(this.selectionMode) {
        case DevicePresetsMode.SELECTION_OFF:
            selectedResult = browser.getSelectedResult();
            d.setBlock(0, 0, "Preset:").setBlock(2, 0, selectedResult == null ? "None" : selectedResult);
            for (int i = 0; i < 6; i++) {
                final IBrowserColumn column = browser.getFilterColumn(i);
                d.setCell(0, 2 + i, StringUtils.shortenAndFixASCII(column.getName() + ":", 8)).setCell(2, 2 + i, column.doesCursorExist() ? column.getCursorName() : "");
            }
            break;
        case DevicePresetsMode.SELECTION_PRESET:
            final IBrowserColumnItem[] results = browser.getResultColumnItems();
            for (int i = 0; i < 16; i++) d.setCell(i % 2 * 2, i / 2, (results[i].isSelected() ? SLDisplay.RIGHT_ARROW : " ") + results[i].getName());
            break;
        case DevicePresetsMode.SELECTION_FILTER:
            final IBrowserColumnItem[] items = browser.getFilterColumn(this.filterColumn).getItems();
            for (int i = 0; i < 16; i++) {
                final String name = StringUtils.fixASCII(items[i].getName());
                String text = (items[i].isSelected() ? SLDisplay.RIGHT_ARROW : " ") + name + "                ";
                if (!name.isEmpty()) {
                    final String hitStr = "(" + items[i].getHitCount() + ")";
                    text = text.substring(0, 17 - hitStr.length()) + hitStr;
                }
                d.setCell(i % 2 * 2, i / 2, text);
            }
            break;
    }
    d.allDone();
}
Also used : IBrowser(de.mossgrabers.framework.daw.IBrowser) IBrowserColumnItem(de.mossgrabers.framework.daw.data.IBrowserColumnItem) IBrowserColumn(de.mossgrabers.framework.daw.data.IBrowserColumn) Display(de.mossgrabers.framework.controller.display.Display) SLDisplay(de.mossgrabers.sl.controller.SLDisplay)

Example 25 with Display

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

the class FrameMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final Display d = this.surface.getDisplay();
    d.clear().setBlock(0, 0, "Layouts:").setCell(0, 3, "Panels:");
    for (int i = 0; i < COMMANDS.length; i++) d.setCell(2, i, COMMANDS[i]);
    d.done(0).done(2);
}
Also used : Display(de.mossgrabers.framework.controller.display.Display)

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