Search in sources :

Example 31 with Display

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

the class PlayView method onScene.

/**
 * {@inheritDoc}
 */
@Override
public void onScene(final int scene, final ButtonEvent event) {
    if (event != ButtonEvent.DOWN)
        return;
    if (!this.model.canSelectedTrackHoldNotes())
        return;
    final Display display = this.surface.getDisplay();
    String name;
    switch(scene) {
        case 0:
            this.scales.nextScaleLayout();
            name = this.scales.getScaleLayout().getName();
            this.surface.getConfiguration().setScaleLayout(name);
            display.notify(name);
            break;
        case 1:
            this.scales.prevScaleLayout();
            name = this.scales.getScaleLayout().getName();
            this.surface.getConfiguration().setScaleLayout(name);
            display.notify(name);
            break;
        case 5:
            this.scales.toggleChromatic();
            final boolean isChromatic = this.scales.isChromatic();
            this.surface.getConfiguration().setScaleInKey(!isChromatic);
            display.notify(isChromatic ? "Chromatic" : "In Key");
            break;
        case 6:
            this.scales.setScaleOffset(this.scales.getScaleOffset() + 1);
            name = Scales.BASES[this.scales.getScaleOffset()];
            this.surface.getConfiguration().setScaleBase(name);
            display.notify(name);
            break;
        case 7:
            this.scales.setScaleOffset(this.scales.getScaleOffset() - 1);
            name = Scales.BASES[this.scales.getScaleOffset()];
            this.surface.getConfiguration().setScaleBase(name);
            display.notify(name);
            break;
        default:
            // Intentionally empty
            break;
    }
    this.updateNoteMapping();
}
Also used : Display(de.mossgrabers.framework.controller.display.Display)

Example 32 with Display

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

the class SelectCommand method executeNormal.

/**
 * {@inheritDoc}
 */
@Override
public void executeNormal(final ButtonEvent event) {
    if (event != ButtonEvent.DOWN)
        return;
    if (this.index == 8) {
        this.model.getMasterTrack().select();
        return;
    }
    final Display display = this.surface.getDisplay();
    // Select Send channels when Send button is additionally pressed
    if (this.surface.isPressed(MCUControlSurface.MCU_MODE_SENDS)) {
        if (this.model.getEffectTrackBank().getTrack(this.channel).doesExist()) {
            this.surface.getModeManager().setActiveMode(Integer.valueOf(Modes.MODE_SEND1.intValue() + this.index));
            display.notify("Send channel " + (this.channel + 1) + " selected.");
        } else
            display.notify("Send channel " + (this.channel + 1) + " does not exist.");
        this.surface.setButtonConsumed(MCUControlSurface.MCU_MODE_SENDS);
        return;
    }
    if (this.surface.isShiftPressed()) {
        final MCUConfiguration configuration = this.surface.getConfiguration();
        configuration.setNewClipLength(this.index);
        display.notify("New clip length: " + AbstractConfiguration.NEW_CLIP_LENGTH_VALUES[configuration.getNewClipLength()]);
        return;
    }
    if (this.surface.isSelectPressed()) {
        this.model.getCurrentTrackBank().getTrack(this.channel).stop();
        return;
    }
    this.model.getCurrentTrackBank().getTrack(this.channel).selectAndMakeVisible();
}
Also used : MCUConfiguration(de.mossgrabers.mcu.MCUConfiguration) Display(de.mossgrabers.framework.controller.display.Display)

Example 33 with Display

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

the class RibbonMode method updateDisplay1.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay1() {
    final Display d = this.surface.getDisplay();
    final PushConfiguration config = this.surface.getConfiguration();
    final String ribbonModeCC = Integer.toString(config.getRibbonModeCCVal());
    final int ribbonMode = config.getRibbonMode();
    d.clear().setCell(0, 0, "Modulatn").setCell(0, 1, "Expressn").setCell(0, 2, "Volume").setCell(0, 3, "Sustain").setCell(0, 7, "Midi CC");
    d.setCell(1, 7, ribbonModeCC).setCell(3, 0, (ribbonMode == PushConfiguration.RIBBON_MODE_PITCH ? PushDisplay.RIGHT_ARROW : "") + "Pitchbd").setCell(3, 1, (ribbonMode == PushConfiguration.RIBBON_MODE_CC ? PushDisplay.RIGHT_ARROW : "") + "CC").setCell(3, 2, (ribbonMode == PushConfiguration.RIBBON_MODE_CC_PB ? PushDisplay.RIGHT_ARROW : "") + "CC/Pitch").setCell(3, 3, (ribbonMode == PushConfiguration.RIBBON_MODE_PB_CC ? PushDisplay.RIGHT_ARROW : "") + "Pitch/CC").setCell(3, 4, (ribbonMode == PushConfiguration.RIBBON_MODE_FADER ? PushDisplay.RIGHT_ARROW : "") + "Fader").allDone();
}
Also used : PushConfiguration(de.mossgrabers.push.PushConfiguration) Display(de.mossgrabers.framework.controller.display.Display) PushDisplay(de.mossgrabers.push.controller.PushDisplay)

Example 34 with Display

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

the class ScaleLayoutMode method updateDisplay1.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay1() {
    final Display d = this.surface.getDisplay();
    final int sl = this.scales.getScaleLayout().ordinal();
    final int pos = sl / 2;
    final String[] names = ScaleLayout.getNames();
    d.clear().setBlock(1, 0, "Scale layout:");
    for (int i = 0; i < names.length; i += 2) d.setCell(3, i / 2, (pos == i / 2 ? PushDisplay.RIGHT_ARROW : " ") + names[i].replace(" ^", ""));
    d.setCell(3, 7, sl % 2 == 0 ? "Horizontal" : "Vertical");
    d.allDone();
}
Also used : Display(de.mossgrabers.framework.controller.display.Display) PushDisplay(de.mossgrabers.push.controller.PushDisplay)

Example 35 with Display

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

the class ScalesMode method updateDisplay1.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay1() {
    final Display d = this.surface.getDisplay();
    final Scale scale = this.scales.getScale();
    final int offset = this.scales.getScaleOffset();
    final Scale[] scaleValues = Scale.values();
    final String rangeText = this.scales.getRangeText();
    d.setBlock(0, 0, PushDisplay.RIGHT_ARROW + scale.getName()).clearBlock(0, 1).clearBlock(0, 2).setBlock(0, 3, rangeText).done(0);
    int pos = scale.ordinal() + 1;
    final String name1 = pos < scaleValues.length ? scaleValues[pos].getName() : "";
    d.setBlock(1, 0, " " + name1).clearBlock(1, 1).clearBlock(1, 2).clearBlock(1, 3).done(1);
    pos++;
    final String name2 = pos < scaleValues.length ? scaleValues[pos].getName() : "";
    d.setCell(2, 0, " " + name2);
    for (int i = 0; i < 6; i++) d.setCell(2, i + 1, "  " + (offset == i ? PushDisplay.RIGHT_ARROW : " ") + Scales.BASES[i]);
    d.clearCell(2, 7).done(2);
    pos++;
    final String name3 = pos < scaleValues.length ? scaleValues[pos].getName() : "";
    d.setCell(3, 0, " " + name3);
    for (int i = 6; i < 12; i++) d.setCell(3, i - 5, "  " + (offset == i ? PushDisplay.RIGHT_ARROW : " ") + Scales.BASES[i]);
    d.setCell(3, 7, this.scales.isChromatic() ? "Chromatc" : "In Key").done(3);
}
Also used : Scale(de.mossgrabers.framework.scale.Scale) 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