Search in sources :

Example 41 with ISend

use of de.mossgrabers.framework.daw.data.ISend in project DrivenByMoss by git-moss.

the class SendMode method getName.

/**
 * {@inheritDoc}
 */
@Override
public String getName() {
    final Optional<ITrack> selectedTrack = this.model.getTrackBank().getSelectedItem();
    String name = "-";
    if (selectedTrack.isPresent()) {
        final ISend send = selectedTrack.get().getSendBank().getItem(this.sendIndex);
        if (send.doesExist())
            name = send.getName();
    }
    return super.getName() + ": " + name;
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ISend(de.mossgrabers.framework.daw.data.ISend)

Example 42 with ISend

use of de.mossgrabers.framework.daw.data.ISend in project DrivenByMoss by git-moss.

the class TrackMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    if (!this.surface.getConfiguration().hasDisplay1())
        return;
    this.drawDisplay2();
    if (!this.drawTrackHeader())
        return;
    final ITextDisplay d = this.surface.getTextDisplay().clear();
    final Optional<ITrack> selectedTrack = this.getSelectedTrack();
    if (selectedTrack.isEmpty()) {
        d.notify("Please select a track...");
        return;
    }
    final boolean displayTrackNames = this.surface.getConfiguration().isDisplayTrackNames();
    if (!displayTrackNames) {
        d.setCell(0, 0, "Volume");
        d.setCell(0, 1, "Pan");
    }
    final ITrack t = selectedTrack.get();
    d.setCell(1, 0, t.getVolumeStr(6));
    d.setCell(1, 1, t.getPanStr(6));
    final int sendStart = 2;
    final int sendCount = 6;
    final boolean isEffectTrackBankActive = this.model.isEffectTrackBankActive();
    final ISendBank sendBank = t.getSendBank();
    for (int i = 0; i < sendCount; i++) {
        final int pos = sendStart + i;
        if (!isEffectTrackBankActive && i < sendBank.getItemCount()) {
            final ISend send = sendBank.getItem(i);
            if (send.doesExist()) {
                if (!displayTrackNames)
                    d.setCell(0, pos, StringUtils.fixASCII(send.getName()));
                d.setCell(1, pos, send.getDisplayedValue(6));
            }
        }
    }
    if (!displayTrackNames)
        d.done(0);
    d.done(1);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay) ISend(de.mossgrabers.framework.daw.data.ISend) ISendBank(de.mossgrabers.framework.daw.data.bank.ISendBank)

Example 43 with ISend

use of de.mossgrabers.framework.daw.data.ISend in project DrivenByMoss by git-moss.

the class SLMkIIITrackMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final SLMkIIIDisplay d = this.surface.getDisplay();
    d.clear();
    d.setCell(0, 8, "Track");
    final ITrack cursorTrack = this.model.getCursorTrack();
    if (!cursorTrack.doesExist()) {
        d.setBlock(1, 1, " Please  select a").setBlock(1, 2, "track.");
        d.setCell(1, 8, "");
        d.hideAllElements();
    } else {
        d.setCell(0, 0, "Volume").setCell(1, 0, cursorTrack.getVolumeStr(9));
        d.setPropertyColor(0, 0, SLMkIIIColorManager.SLMKIII_BLUE);
        d.setPropertyColor(0, 1, SLMkIIIColorManager.SLMKIII_BLUE);
        d.setCell(0, 1, "Pan").setCell(1, 1, cursorTrack.getPanStr(9));
        d.setPropertyColor(1, 0, SLMkIIIColorManager.SLMKIII_ORANGE);
        d.setPropertyColor(1, 1, SLMkIIIColorManager.SLMKIII_ORANGE);
        final ISendBank sendBank = cursorTrack.getSendBank();
        for (int i = 0; i < 6; i++) {
            final int pos = 2 + i;
            int color = SLMkIIIColorManager.SLMKIII_BLACK;
            if (sendBank.getItemCount() > 0) {
                final ISend send = sendBank.getItem(i);
                if (send.doesExist()) {
                    d.setCell(0, pos, send.getName(9)).setCell(1, pos, send.getDisplayedValue(9));
                    color = SLMkIIIColorManager.SLMKIII_YELLOW;
                }
            }
            d.setPropertyColor(pos, 0, color);
            d.setPropertyColor(pos, 1, color);
        }
        d.setCell(1, 8, StringUtils.fixASCII(cursorTrack.getName(9)));
    }
    this.drawRow4();
    this.setButtonInfo(d);
    d.allDone();
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ISend(de.mossgrabers.framework.daw.data.ISend) SLMkIIIDisplay(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIDisplay) ISendBank(de.mossgrabers.framework.daw.data.bank.ISendBank)

Example 44 with ISend

use of de.mossgrabers.framework.daw.data.ISend in project DrivenByMoss by git-moss.

the class SLMkIIISendMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final SLMkIIIDisplay d = this.surface.getDisplay();
    d.clear();
    d.setCell(0, 8, "Send " + (this.sendIndex + 1));
    final ITrackBank tb = this.model.getCurrentTrackBank();
    for (int i = 0; i < 8; i++) {
        int color = SLMkIIIColorManager.SLMKIII_BLACK;
        final ITrack t = tb.getItem(i);
        if (t.doesExist()) {
            final ISend send = t.getSendBank().getItem(this.sendIndex);
            if (send.doesExist()) {
                d.setCell(0, i, send.getName(9)).setCell(1, i, send.getDisplayedValue(9));
                color = SLMkIIIColorManager.SLMKIII_YELLOW;
            }
        }
        this.setColumnColors(d, i, t, color);
    }
    final ITrack cursorTrack = this.model.getCursorTrack();
    d.setCell(1, 8, cursorTrack == null ? "" : StringUtils.fixASCII(cursorTrack.getName(9)));
    this.drawRow4();
    this.setButtonInfo(d);
    d.allDone();
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ISend(de.mossgrabers.framework.daw.data.ISend) SLMkIIIDisplay(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIDisplay)

Example 45 with ISend

use of de.mossgrabers.framework.daw.data.ISend in project DrivenByMoss by git-moss.

the class MaschineSendSelectCommand method executeNormal.

/**
 * {@inheritDoc}
 */
@Override
public void executeNormal(final ButtonEvent event) {
    final ModeManager modeManager = this.surface.getModeManager();
    final Modes activeMode = modeManager.getActiveID();
    super.executeNormal(event);
    final Modes newMode = modeManager.getActiveID();
    if (activeMode == newMode)
        return;
    final int sendIndex = newMode.ordinal() - Modes.SEND1.ordinal();
    final Optional<ITrack> t = this.model.getCurrentTrackBank().getSelectedItem();
    if (t.isEmpty())
        return;
    final ISendBank sendBank = t.get().getSendBank();
    final ISend send = sendBank.getItem(sendIndex);
    if (send.doesExist())
        this.surface.getDisplay().notify("Send " + (sendIndex + 1) + ": " + send.getName());
}
Also used : Modes(de.mossgrabers.framework.mode.Modes) ITrack(de.mossgrabers.framework.daw.data.ITrack) ISend(de.mossgrabers.framework.daw.data.ISend) ISendBank(de.mossgrabers.framework.daw.data.bank.ISendBank) ModeManager(de.mossgrabers.framework.featuregroup.ModeManager)

Aggregations

ISend (de.mossgrabers.framework.daw.data.ISend)52 ITrack (de.mossgrabers.framework.daw.data.ITrack)40 ISendBank (de.mossgrabers.framework.daw.data.bank.ISendBank)17 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)11 ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)10 IChannel (de.mossgrabers.framework.daw.data.IChannel)9 Display (de.mossgrabers.framework.controller.display.Display)6 IValueChanger (de.mossgrabers.framework.controller.valuechanger.IValueChanger)5 PushConfiguration (de.mossgrabers.push.PushConfiguration)5 PushDisplay (de.mossgrabers.push.controller.PushDisplay)5 PushConfiguration (de.mossgrabers.controller.ableton.push.PushConfiguration)4 ITextDisplay (de.mossgrabers.framework.controller.display.ITextDisplay)4 SendData (de.mossgrabers.framework.graphics.canvas.utils.SendData)4 IValueChanger (de.mossgrabers.framework.controller.IValueChanger)3 TitleChannelsComponent (de.mossgrabers.controller.akai.fire.graphics.canvas.component.TitleChannelsComponent)2 FaderConfig (de.mossgrabers.controller.ni.maschine.jam.controller.FaderConfig)2 SLMkIIIDisplay (de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIDisplay)2 ColorEx (de.mossgrabers.framework.controller.color.ColorEx)2 IGraphicDisplay (de.mossgrabers.framework.controller.display.IGraphicDisplay)2 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)2