Search in sources :

Example 6 with ISend

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

the class SendMode method onValueKnobTouch.

/**
 * {@inheritDoc}
 */
@Override
public void onValueKnobTouch(final int index, final boolean isTouched) {
    final int sendIndex = this.getCurrentSendIndex();
    this.isKnobTouched[index] = isTouched;
    final ITrack t = this.model.getCurrentTrackBank().getTrack(index);
    final ISend send = t.getSend(sendIndex);
    if (isTouched) {
        if (this.surface.isDeletePressed()) {
            this.surface.setButtonConsumed(this.surface.getDeleteButtonId());
            send.resetValue();
            return;
        }
        final IChannelBank fxTrackBank = this.model.getEffectTrackBank();
        if (t.doesExist())
            this.surface.getDisplay().notify("Send " + (fxTrackBank == null ? send.getName() : fxTrackBank.getTrack(sendIndex).getName()) + ": " + send.getValue());
    }
    send.touchValue(isTouched);
    this.checkStopAutomationOnKnobRelease(isTouched);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) ISend(de.mossgrabers.framework.daw.data.ISend)

Example 7 with ISend

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

the class DeviceLayerMode method updateDisplay1.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay1() {
    final Display d = this.surface.getDisplay().clear();
    final ICursorDevice cd = this.model.getCursorDevice();
    if (!cd.hasSelectedDevice()) {
        d.setBlock(1, 0, "           Select").setBlock(1, 1, "a device or press").setBlock(1, 2, "'Add Effect'...  ").allDone();
        return;
    }
    final boolean noLayers = cd.hasLayers() && cd.hasZeroLayers();
    if (noLayers) {
        d.setBlock(1, 1, "    Please create").setBlock(1, 2, cd.hasDrumPads() ? "a Drum Pad..." : "a Device Layer...");
    } else {
        final IChannel l = cd.getSelectedLayerOrDrumPad();
        if (l != null) {
            d.setCell(0, 0, "Volume").setCell(1, 0, l.getVolumeStr(8)).setCell(2, 0, this.surface.getConfiguration().isEnableVUMeters() ? l.getVu() : l.getVolume(), Format.FORMAT_VALUE);
            d.setCell(0, 1, "Pan").setCell(1, 1, l.getPanStr(8)).setCell(2, 1, l.getPan(), Format.FORMAT_PAN);
            final IChannelBank fxTrackBank = this.model.getEffectTrackBank();
            if (fxTrackBank == null) {
                for (int i = 0; i < 6; i++) {
                    final int pos = 2 + i;
                    final ISend send = l.getSend(i);
                    d.setCell(0, pos, send.getName()).setCell(1, pos, send.getDisplayedValue(8)).setCell(2, pos, send.getValue(), Format.FORMAT_VALUE);
                }
            } else {
                final boolean isFX = this.model.isEffectTrackBankActive();
                for (int i = 0; i < 6; i++) {
                    final ITrack fxTrack = fxTrackBank.getTrack(i);
                    final boolean isEmpty = isFX || !fxTrack.doesExist();
                    final int pos = 2 + i;
                    if (isEmpty) {
                        d.clearCell(0, pos);
                        d.clearCell(2, pos);
                    } else {
                        final ISend send = l.getSend(i);
                        d.setCell(0, pos, fxTrack.getName()).setCell(1, pos, send.getDisplayedValue(8));
                        d.setCell(2, pos, send.getValue(), Format.FORMAT_VALUE);
                    }
                }
            }
        }
    }
    this.drawRow4(d, cd);
}
Also used : IChannel(de.mossgrabers.framework.daw.data.IChannel) ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) ISend(de.mossgrabers.framework.daw.data.ISend) ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice) Display(de.mossgrabers.framework.controller.display.Display) PushDisplay(de.mossgrabers.push.controller.PushDisplay)

Example 8 with ISend

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

the class DeviceLayerModeSend method updateDisplay1.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay1() {
    final Display d = this.surface.getDisplay();
    final ICursorDevice cd = this.model.getCursorDevice();
    // Drum Pad Bank has size of 16, layers only 8
    final int offset = getDrumPadIndex(cd);
    final int sendIndex = this.getCurrentSendIndex();
    for (int i = 0; i < 8; i++) {
        final IChannel layer = cd.getLayerOrDrumPad(offset + i);
        final boolean exists = layer.doesExist();
        final ISend send = layer.getSend(sendIndex);
        d.setCell(0, i, exists ? send.getName() : "").setCell(1, i, send.getDisplayedValue(8));
        if (exists)
            d.setCell(2, i, send.getValue(), Format.FORMAT_VALUE);
        else
            d.clearCell(2, i);
    }
    d.done(0).done(1).done(2);
    this.drawRow4(d, cd);
}
Also used : IChannel(de.mossgrabers.framework.daw.data.IChannel) ISend(de.mossgrabers.framework.daw.data.ISend) ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice) Display(de.mossgrabers.framework.controller.display.Display)

Example 9 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() {
    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 10 with ISend

use of de.mossgrabers.framework.daw.data.ISend 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)

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