Search in sources :

Example 36 with IMasterTrack

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

the class OptionsMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITransport transport = this.model.getTransport();
    final SLMkIIIDisplay d = this.surface.getDisplay();
    d.clear();
    d.setCell(3, 0, "Undo");
    d.setPropertyColor(0, 2, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setPropertyValue(0, 1, 0);
    d.setCell(3, 1, "Redo");
    d.setPropertyColor(1, 2, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setPropertyValue(1, 1, 0);
    d.setCell(3, 2, "<<Project");
    d.setPropertyColor(2, 2, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setPropertyValue(2, 1, 0);
    d.setCell(3, 3, "Project>>");
    d.setPropertyColor(3, 2, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setPropertyValue(3, 1, 0);
    d.setCell(3, 4, "Tap");
    d.setPropertyColor(4, 2, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setPropertyValue(4, 1, 0);
    d.setCell(3, 5, transport.isMetronomeOn() ? "On" : "Off");
    d.setPropertyColor(5, 2, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setPropertyValue(5, 1, transport.isMetronomeOn() ? 1 : 0);
    d.setCell(3, 6, "Engine");
    d.setPropertyColor(6, 2, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setPropertyValue(6, 1, this.model.getApplication().isEngineActive() ? 1 : 0);
    d.setCell(3, 7, "Quantize");
    d.setPropertyColor(7, 2, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setPropertyValue(7, 1, 0);
    final IMasterTrack master = this.model.getMasterTrack();
    d.setCell(0, 0, StringUtils.fixASCII("Mstr Vol")).setCell(1, 0, master.getVolumeStr(9));
    d.setPropertyColor(0, 0, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setPropertyColor(0, 1, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setCell(0, 1, StringUtils.fixASCII("Mstr Pan")).setCell(1, 1, master.getPanStr(9));
    d.setPropertyColor(1, 0, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setPropertyColor(1, 1, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setCell(0, 4, StringUtils.fixASCII("Tempo")).setCell(1, 4, transport.formatTempo(transport.getTempo()));
    d.setPropertyColor(4, 0, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setPropertyColor(4, 1, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setCell(0, 5, StringUtils.fixASCII("Metronome")).setCell(1, 5, transport.getMetronomeVolumeStr());
    d.setPropertyColor(5, 0, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setPropertyColor(5, 1, SLMkIIIColorManager.SLMKIII_BROWN);
    d.setCell(0, 8, "Master");
    this.setButtonInfo(d);
    d.allDone();
}
Also used : ITransport(de.mossgrabers.framework.daw.ITransport) SLMkIIIDisplay(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIDisplay) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack)

Example 37 with IMasterTrack

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

the class OptionsMode method getKnobValue.

/**
 * {@inheritDoc}
 */
@Override
public int getKnobValue(final int index) {
    final ITransport transport = this.model.getTransport();
    final IMasterTrack master = this.model.getMasterTrack();
    switch(index) {
        case 0:
            return master.getVolume();
        case 1:
            return master.getPan();
        case 4:
            return (int) transport.scaleTempo(transport.getTempo(), this.model.getValueChanger().getUpperBound());
        case 5:
            return transport.getMetronomeVolume();
        default:
            return 0;
    }
}
Also used : ITransport(de.mossgrabers.framework.daw.ITransport) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack)

Example 38 with IMasterTrack

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

the class LaunchkeyMk3ParameterMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay();
    if (this.areKnobs) {
        // Display device and current parameter page
        final StringBuilder sb = new StringBuilder();
        if (this.cursorDevice.doesExist())
            sb.append(this.cursorDevice.getName(8)).append(' ').append(this.cursorDevice.getParameterPageBank().getSelectedItem());
        else
            sb.append("No device");
        d.setCell(LaunchkeyMk3Display.SCREEN_ROW_BASE, 0, sb.toString());
        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";
        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
    final IParameterBank parameterBank = this.cursorDevice.getParameterBank();
    for (int i = 0; i < 8; i++) {
        final IParameter item = parameterBank.getItem(i);
        final boolean exists = item.doesExist();
        final int offset = i * 2;
        d.setCell(row + offset, 0, exists ? item.getName() : "No parameter");
        d.setCell(row + offset + 1, 0, exists ? item.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 : IParameter(de.mossgrabers.framework.daw.data.IParameter) ICursorTrack(de.mossgrabers.framework.daw.data.ICursorTrack) ITextDisplay(de.mossgrabers.framework.controller.display.ITextDisplay) IParameterBank(de.mossgrabers.framework.daw.data.bank.IParameterBank) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack)

Example 39 with IMasterTrack

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

the class LaunchkeyMk3VolumeMode method updateDisplay.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay() {
    final ITextDisplay d = this.surface.getTextDisplay();
    if (this.areKnobs) {
        d.setCell(LaunchkeyMk3Display.SCREEN_ROW_BASE, 0, "Volume" + this.formatPageRange(" %d - %d"));
        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";
        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
    final ITrackBank tb = this.model.getCurrentTrackBank();
    for (int i = 0; i < 8; i++) {
        final ITrack t = tb.getItem(i);
        final boolean exists = t.doesExist();
        final int offset = i * 2;
        d.setCell(row + offset, 0, exists ? String.format("%d: %s", Integer.valueOf(t.getPosition() + 1), t.getName()) : "No track");
        d.setCell(row + offset + 1, 0, exists ? "Vol: " + t.getVolumeStr() : "");
    }
    // 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) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack)

Example 40 with IMasterTrack

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

the class PanView method getButtonColor.

/**
 * {@inheritDoc}
 */
@Override
public int getButtonColor(final ButtonID buttonID) {
    final IMasterTrack track = this.model.getMasterTrack();
    final int color = track.doesExist() ? this.colorManager.getColorIndex(DAWColor.getColorIndex(track.getColor())) : 0;
    this.masterFader.setup(color, true);
    this.masterFader.setValue(track.getPan());
    final int index = 7 - (buttonID.ordinal() - ButtonID.SCENE1.ordinal());
    return this.masterFader.getColorState(index);
}
Also used : IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack)

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