Search in sources :

Example 41 with ITrackBank

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

the class SendMode method updateDisplay1.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay1(final ITextDisplay display) {
    final ITrackBank tb = this.model.getCurrentTrackBank();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(i);
        if (t.doesExist()) {
            final ISend send = t.getSendBank().getItem(this.sendIndex);
            display.setCell(0, i, send.getName());
            display.setCell(1, i, send.getDisplayedValue(8));
            display.setCell(2, i, send.getValue(), Format.FORMAT_VALUE);
        }
    }
    this.drawRow4(display);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ISend(de.mossgrabers.framework.daw.data.ISend)

Example 42 with ITrackBank

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

the class SendMode method updateDisplay2.

/**
 * {@inheritDoc}
 */
@SuppressWarnings("null")
@Override
public void updateDisplay2(final IGraphicDisplay display) {
    this.updateTrackMenu(5 + this.sendIndex % 4);
    final ITrackBank tb = this.model.getCurrentTrackBank();
    final IValueChanger valueChanger = this.model.getValueChanger();
    final int sendOffset = this.surface.getConfiguration().isSendsAreToggled() ? 4 : 0;
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(i);
        final SendData[] sendData = new SendData[4];
        for (int j = 0; j < 4; j++) {
            final int sendPos = sendOffset + j;
            final ISend send = t.getSendBank().getItem(sendPos);
            final boolean exists = send != null && send.doesExist();
            sendData[j] = new SendData(exists ? send.getName() : " ", exists && this.sendIndex == sendPos && this.isKnobTouched[i] ? send.getDisplayedValue(8) : "", valueChanger.toDisplayValue(exists ? send.getValue() : -1), valueChanger.toDisplayValue(exists ? send.getModulatedValue() : -1), this.sendIndex == sendPos);
        }
        final Pair<String, Boolean> pair = this.menu.get(i);
        display.addSendsElement(pair.getKey(), pair.getValue().booleanValue(), t.doesExist() ? t.getName() : "", this.updateType(t), t.getColor(), t.isSelected(), sendData, false, t.isActivated(), t.isActivated());
    }
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) IValueChanger(de.mossgrabers.framework.controller.valuechanger.IValueChanger) ISend(de.mossgrabers.framework.daw.data.ISend) SendData(de.mossgrabers.framework.graphics.canvas.utils.SendData)

Example 43 with ITrackBank

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

the class DeviceLayerMode method handleSendEffect.

/**
 * Handle the selection of a send effect.
 *
 * @param sendIndex The index of the send
 */
protected void handleSendEffect(final int sendIndex) {
    if (this.model.isEffectTrackBankActive())
        return;
    final ITrackBank fxTrackBank = this.model.getEffectTrackBank();
    if (fxTrackBank == null || !fxTrackBank.getItem(sendIndex).doesExist())
        return;
    final Modes si = Modes.get(Modes.DEVICE_LAYER_SEND1, sendIndex);
    final ModeManager modeManager = this.surface.getModeManager();
    this.setMode(modeManager.isActive(si) ? Modes.DEVICE_LAYER : si);
}
Also used : Modes(de.mossgrabers.framework.mode.Modes) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ModeManager(de.mossgrabers.framework.featuregroup.ModeManager)

Example 44 with ITrackBank

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

the class AbstractTrackMode method updateStopMenu.

protected void updateStopMenu() {
    final ITrackBank tb = this.model.getCurrentTrackBank();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(i);
        this.menu.get(i).set(t.doesExist() ? "Stop Clip" : "", Boolean.valueOf(t.isPlaying()));
    }
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank)

Example 45 with ITrackBank

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

the class AbstractTrackMode method handleSendEffect.

/**
 * Handle the selection of a send effect.
 *
 * @param sendIndex The index of the send
 */
protected void handleSendEffect(final int sendIndex) {
    final ITrackBank tb = this.model.getCurrentTrackBank();
    if (tb == null || !tb.canEditSend(sendIndex))
        return;
    final Modes si = Modes.get(Modes.SEND1, sendIndex);
    final ModeManager modeManager = this.surface.getModeManager();
    modeManager.setActive(modeManager.isActive(si) ? Modes.TRACK : si);
}
Also used : Modes(de.mossgrabers.framework.mode.Modes) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ModeManager(de.mossgrabers.framework.featuregroup.ModeManager)

Aggregations

ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)121 ITrack (de.mossgrabers.framework.daw.data.ITrack)85 ModeManager (de.mossgrabers.framework.featuregroup.ModeManager)17 ITextDisplay (de.mossgrabers.framework.controller.display.ITextDisplay)16 Modes (de.mossgrabers.framework.mode.Modes)15 PushConfiguration (de.mossgrabers.controller.ableton.push.PushConfiguration)10 IPadGrid (de.mossgrabers.framework.controller.grid.IPadGrid)10 ISend (de.mossgrabers.framework.daw.data.ISend)10 ISendBank (de.mossgrabers.framework.daw.data.bank.ISendBank)8 ICursorDevice (de.mossgrabers.framework.daw.data.ICursorDevice)7 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)7 ICursorTrack (de.mossgrabers.framework.daw.data.ICursorTrack)6 IValueChanger (de.mossgrabers.framework.controller.valuechanger.IValueChanger)5 ITransport (de.mossgrabers.framework.daw.ITransport)5 IParameterBank (de.mossgrabers.framework.daw.data.bank.IParameterBank)5 ISceneBank (de.mossgrabers.framework.daw.data.bank.ISceneBank)5 SLMkIIIDisplay (de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIDisplay)4 ColorEx (de.mossgrabers.framework.controller.color.ColorEx)4 Kontrol1Display (de.mossgrabers.controller.ni.kontrol.mki.controller.Kontrol1Display)3 IHost (de.mossgrabers.framework.daw.IHost)3