Search in sources :

Example 11 with ISend

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

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

the class TrackMode method updateDisplay1.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay1(final ITextDisplay display) {
    final ITrackBank tb = this.model.getCurrentTrackBank();
    final Optional<ITrack> track = tb.getSelectedItem();
    if (track.isEmpty())
        display.setRow(1, "                     Please selecta track...                        ");
    else {
        final ITrack t = track.get();
        final PushConfiguration config = this.surface.getConfiguration();
        final int upperBound = this.model.getValueChanger().getUpperBound();
        final String volValueStr = config.isEnableVUMeters() ? Push1Display.formatValue(t.getVolume(), t.getVu(), upperBound) : Push1Display.formatValue(t.getVolume(), upperBound);
        display.setCell(0, 0, "Volume").setCell(1, 0, t.getVolumeStr(8)).setCell(2, 0, volValueStr);
        display.setCell(0, 1, "Pan").setCell(1, 1, t.getPanStr(8)).setCell(2, 1, t.getPan(), Format.FORMAT_PAN);
        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) {
                final ISend send = sendBank.getItem(i);
                if (send.doesExist())
                    display.setCell(0, pos, send.getName()).setCell(1, pos, send.getDisplayedValue(8)).setCell(2, pos, send.getValue(), Format.FORMAT_VALUE);
            }
        }
    }
    this.drawRow4(display);
}
Also used : PushConfiguration(de.mossgrabers.controller.ableton.push.PushConfiguration) ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ISend(de.mossgrabers.framework.daw.data.ISend) ISendBank(de.mossgrabers.framework.daw.data.bank.ISendBank)

Example 13 with ISend

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

the class ControlMode method sendTrackData.

/**
 * Send the track data.
 *
 * @param d The display
 * @param trackIndex The index of the track to which the clips belong
 * @param track The track
 */
private static void sendTrackData(final ACVSDisplay d, final int trackIndex, final ITrack track) {
    d.setRow(ACVSDisplay.ITEM_ID_TRACK_HEADER_FIRST + trackIndex, track.getName());
    d.setColor(ACVSDisplay.ITEM_ID_TRACK_HEADER_FIRST + trackIndex, track.getColor());
    d.setRow(ACVSDisplay.ITEM_ID_TRACK_FADER_LEVEL_FIRST + trackIndex, track.getVolumeStr());
    // ITEM_ID_TRACK_PEAK_LEVEL_FIRST - not showing up
    d.setRow(ACVSDisplay.ITEM_ID_TRACK_PAN_FIRST + trackIndex, track.getPanStr());
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_SELECT, trackIndex), track.isSelected() ? 127 : 0);
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_TYPE, trackIndex), getTrackType(track));
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_SOLO, trackIndex), track.isSolo() ? 127 : 0);
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_MUTE, trackIndex), track.isMute() ? 127 : 0);
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_SOLOMUTE, trackIndex), track.isMutedBySolo() ? 127 : 0);
    // TRACK1_CUE - not supported
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_CROSSFADER, trackIndex), getCrossfade(track.getCrossfadeParameter().getValue()));
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_REC_ARM, trackIndex), track.isRecArm() ? 127 : 0);
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_LEVEL, trackIndex), track.getVolume());
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_PAN, trackIndex), track.getPan());
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_VU_LEFT, trackIndex), track.getVuLeft());
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_VU_RIGHT, trackIndex), track.getVuRight());
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_VU_PEAK_LEFT, trackIndex), track.getVuPeakLeft());
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_VU_PEAK_RIGHT, trackIndex), track.getVuPeakRight());
    final ISendBank sendBank = track.getSendBank();
    final ISend send1 = sendBank.getItem(0);
    final ISend send2 = sendBank.getItem(1);
    final ISend send3 = sendBank.getItem(2);
    final ISend send4 = sendBank.getItem(3);
    d.setRow(ACVSDisplay.ITEM_ID_TRACK_SEND1_FIRST + trackIndex, send1.getName());
    d.setRow(ACVSDisplay.ITEM_ID_TRACK_SEND2_FIRST + trackIndex, send2.getName());
    d.setRow(ACVSDisplay.ITEM_ID_TRACK_SEND3_FIRST + trackIndex, send3.getName());
    d.setRow(ACVSDisplay.ITEM_ID_TRACK_SEND4_FIRST + trackIndex, send4.getName());
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_SEND1_LEVEL, trackIndex), send1.getValue());
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_SEND2_LEVEL, trackIndex), send2.getValue());
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_SEND3_LEVEL, trackIndex), send3.getValue());
    d.setScreenItem(ScreenItem.get(ScreenItem.TRACK1_SEND4_LEVEL, trackIndex), send4.getValue());
}
Also used : ISend(de.mossgrabers.framework.daw.data.ISend) ISendBank(de.mossgrabers.framework.daw.data.bank.ISendBank)

Example 14 with ISend

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

the class MaschineSendSelectCommand method executeShifted.

/**
 * {@inheritDoc}
 */
@Override
public void executeShifted(final ButtonEvent event) {
    final ModeManager modeManager = this.surface.getModeManager();
    final Modes activeMode = modeManager.getActiveID();
    super.executeShifted(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)

Example 15 with ISend

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

the class SLTrackMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITrack cursorTrack = this.model.getCursorTrack();
    final ITextDisplay d = this.surface.getTextDisplay().clearRow(0).clearRow(1);
    if (!cursorTrack.doesExist()) {
        d.setRow(0, "                        Please select a track...                       ").done(0).done(1);
        return;
    }
    d.setCell(0, 0, "Volume").setCell(1, 0, cursorTrack.getVolumeStr(8)).setCell(0, 1, "Pan").setCell(1, 1, cursorTrack.getPanStr(8));
    final int sendStart = 2;
    final int sendCount = 6;
    int pos;
    final ISendBank sendBank = cursorTrack.getSendBank();
    if (sendBank.getPageSize() > 0) {
        for (int i = 0; i < sendCount; i++) {
            pos = sendStart + i;
            final ISend send = sendBank.getItem(i);
            if (send.doesExist())
                d.setCell(0, pos, send.getName(8)).setCell(1, pos, send.getDisplayedValue(8));
        }
    }
    d.done(0).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)

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