Search in sources :

Example 26 with IMasterTrack

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

the class MasterMode method updateKnobLEDs.

/**
 * {@inheritDoc}
 */
@Override
public void updateKnobLEDs() {
    final IMasterTrack masterTrack = this.model.getMasterTrack();
    final int upperBound = this.model.getValueChanger().getUpperBound();
    this.surface.setKnobLED(0, MCUControlSurface.KNOB_LED_MODE_WRAP, masterTrack.getVolume(), upperBound);
    this.surface.setKnobLED(1, MCUControlSurface.KNOB_LED_MODE_BOOST_CUT, masterTrack.getPan(), upperBound);
    for (int i = 0; i < 6; i++) this.surface.setKnobLED(2 + i, MCUControlSurface.KNOB_LED_MODE_WRAP, 0, upperBound);
}
Also used : IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack)

Example 27 with IMasterTrack

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

the class LaunchkeyMk3SendMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay();
    final ICursorTrack cursorTrack = this.model.getCursorTrack();
    final String trackText = cursorTrack.doesExist() ? String.format("%d: %s", Integer.valueOf(cursorTrack.getPosition() + 1), cursorTrack.getName()) : "No sel. track";
    final ITrackBank tb = this.model.getCurrentTrackBank();
    if (this.areKnobs) {
        String sendName = tb.getEditSendName(this.sendIndex);
        sendName = StringUtils.optimizeName(sendName.isEmpty() ? "Send " + (this.sendIndex + 1) : sendName, 6);
        d.setCell(LaunchkeyMk3Display.SCREEN_ROW_BASE, 0, sendName + this.formatPageRange(" %d - %d"));
        d.setCell(LaunchkeyMk3Display.SCREEN_ROW_BASE + 1, 0, trackText);
    }
    final int row = this.areKnobs ? LaunchkeyMk3Display.SCREEN_ROW_POTS : LaunchkeyMk3Display.SCREEN_ROW_FADERS;
    // Format track names
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(i);
        final ISend s = t.getSendBank().getItem(this.sendIndex);
        final boolean exists = s.doesExist();
        final int offset = i * 2;
        d.setCell(row + offset, 0, exists ? String.format("%d: %s", Integer.valueOf(s.getPosition() + 1), s.getName()) : "No send");
        d.setCell(row + offset + 1, 0, exists ? "S-Vol: " + s.getDisplayedValue() : "");
    }
    // Add master fader
    if (!this.areKnobs) {
        final IMasterTrack masterTrack = this.model.getMasterTrack();
        d.setCell(row + 16, 0, "Master");
        d.setCell(row + 16 + 1, 0, "Vol: " + masterTrack.getVolumeStr());
    }
    d.allDone();
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.data.bank.ITrackBank) ICursorTrack(de.mossgrabers.framework.daw.data.ICursorTrack) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay) ISend(de.mossgrabers.framework.daw.data.ISend) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack)

Example 28 with IMasterTrack

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

the class MasterMode method setActive.

private void setActive(final boolean enable) {
    final IMasterTrack mt = this.model.getMasterTrack();
    mt.setVolumeIndication(enable);
    mt.setPanIndication(enable);
}
Also used : IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack)

Example 29 with IMasterTrack

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

the class TrackDetailsMode method getSelectedTrack.

private ITrack getSelectedTrack() {
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final ITrack t = tb.getSelectedTrack();
    if (t != null)
        return t;
    final IMasterTrack master = this.model.getMasterTrack();
    return master.isSelected() ? master : null;
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack)

Example 30 with IMasterTrack

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

the class VolumeMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final Display d = this.surface.getDisplay();
    final IMasterTrack masterTrack = this.model.getMasterTrack();
    if (masterTrack.isSelected()) {
        d.clear();
        final String n = StringUtils.shortenAndFixASCII(masterTrack.getName(), 7);
        d.setCell(1, 0, SLDisplay.RIGHT_ARROW + n).setCell(3, 0, masterTrack.getVolumeStr(8)).done(1).done(3);
        return;
    }
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final ITrack selTrack = tb.getSelectedTrack();
    final int selIndex = selTrack == null ? -1 : selTrack.getIndex();
    for (int i = 0; i < 8; i++) {
        final boolean isSel = i == selIndex;
        final ITrack t = tb.getTrack(i);
        final String n = StringUtils.shortenAndFixASCII(t.getName(), isSel ? 7 : 8);
        d.setCell(1, i, isSel ? SLDisplay.RIGHT_ARROW + n : n).setCell(3, i, t.getVolumeStr(8));
    }
    d.done(1).done(3);
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack) Display(de.mossgrabers.framework.controller.display.Display) SLDisplay(de.mossgrabers.sl.controller.SLDisplay)

Aggregations

IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)40 ITrack (de.mossgrabers.framework.daw.data.ITrack)15 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)7 ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)6 ITextDisplay (de.mossgrabers.framework.controller.display.ITextDisplay)5 Display (de.mossgrabers.framework.controller.display.Display)4 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)4 ICursorTrack (de.mossgrabers.framework.daw.data.ICursorTrack)4 ICursorDevice (de.mossgrabers.framework.daw.data.ICursorDevice)3 IParameterBank (de.mossgrabers.framework.daw.data.bank.IParameterBank)3 ColorManager (de.mossgrabers.framework.controller.color.ColorManager)2 IApplication (de.mossgrabers.framework.daw.IApplication)2 IProject (de.mossgrabers.framework.daw.IProject)2 ITrackBank (de.mossgrabers.framework.daw.ITrackBank)2 ITransport (de.mossgrabers.framework.daw.ITransport)2 ISendBank (de.mossgrabers.framework.daw.data.bank.ISendBank)2 ModeManager (de.mossgrabers.framework.mode.ModeManager)2 PushDisplay (de.mossgrabers.push.controller.PushDisplay)2 BeatstepControlSurface (de.mossgrabers.beatstep.controller.BeatstepControlSurface)1 PushColorManager (de.mossgrabers.controller.ableton.push.controller.PushColorManager)1