Search in sources :

Example 1 with IProject

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

the class MasterMode method updateDisplay1.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay1(final ITextDisplay display) {
    final IMasterTrack master = this.model.getMasterTrack();
    final IProject project = this.model.getProject();
    final boolean canEditCueVolume = this.model.getHost().supports(Capability.CUE_VOLUME);
    display.setCell(0, 0, TAG_VOLUME).setCell(0, 1, "Pan");
    if (canEditCueVolume)
        display.setCell(0, 2, TAG_VOLUME).setCell(0, 3, "Mix");
    display.setCell(0, 6, "Project:");
    display.setCell(1, 0, master.getVolumeStr(8)).setCell(1, 1, master.getPanStr(8));
    if (canEditCueVolume)
        display.setCell(1, 2, project.getCueVolumeStr(8)).setCell(1, 3, project.getCueMixStr(8));
    display.setBlock(1, 2, "Audio Engine").setBlock(1, 3, this.model.getProject().getName());
    display.setCell(2, 0, this.surface.getConfiguration().isEnableVUMeters() ? master.getVu() : master.getVolume(), Format.FORMAT_VALUE);
    display.setCell(2, 1, master.getPan(), Format.FORMAT_PAN);
    if (canEditCueVolume) {
        display.setCell(2, 2, project.getCueVolume(), Format.FORMAT_VALUE);
        display.setCell(2, 3, project.getCueMix(), Format.FORMAT_VALUE);
        display.setCell(3, 0, master.getName()).setCell(3, 2, "Cue");
    }
    display.setCell(3, 4, this.model.getApplication().isEngineActive() ? "Active" : "Off");
    display.setCell(3, 6, "Previous").setCell(3, 7, "Next");
}
Also used : IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack) IProject(de.mossgrabers.framework.daw.IProject)

Example 2 with IProject

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

the class MasterMode method updateDisplay2.

/**
 * {@inheritDoc}
 */
@Override
public void updateDisplay2(final IGraphicDisplay display) {
    final IMasterTrack master = this.model.getMasterTrack();
    final IProject project = this.model.getProject();
    final IValueChanger valueChanger = this.model.getValueChanger();
    final boolean enableVUMeters = this.surface.getConfiguration().isEnableVUMeters();
    final int vuR = valueChanger.toDisplayValue(enableVUMeters ? master.getVuRight() : 0);
    final int vuL = valueChanger.toDisplayValue(enableVUMeters ? master.getVuLeft() : 0);
    final ICursorTrack cursorTrack = this.model.getCursorTrack();
    display.addChannelElement(TAG_VOLUME, false, master.getName(), ChannelType.MASTER, master.getColor(), master.isSelected(), valueChanger.toDisplayValue(master.getVolume()), valueChanger.toDisplayValue(master.getModulatedVolume()), this.isKnobTouched[0] ? master.getVolumeStr(8) : "", valueChanger.toDisplayValue(master.getPan()), valueChanger.toDisplayValue(master.getModulatedPan()), this.isKnobTouched[1] ? master.getPanStr(8) : "", vuL, vuR, master.isMute(), master.isSolo(), master.isRecArm(), master.isActivated(), 0, master.isSelected() && cursorTrack.isPinned());
    display.addChannelSelectorElement("Pan", false, "", null, ColorEx.BLACK, false, master.isActivated());
    if (this.model.getHost().supports(Capability.CUE_VOLUME)) {
        display.addChannelElement("Cue Volume", false, "Cue", ChannelType.MASTER, ColorEx.GRAY, false, valueChanger.toDisplayValue(project.getCueVolume()), -1, this.isKnobTouched[2] ? project.getCueVolumeStr(8) : "", valueChanger.toDisplayValue(project.getCueMix()), -1, this.isKnobTouched[3] ? project.getCueMixStr(8) : "", 0, 0, false, false, false, true, 0, false);
        display.addChannelSelectorElement("Cue Mix", false, "", null, ColorEx.BLACK, false, true);
    } else {
        display.addOptionElement("", "", false, "", "", false, false);
        display.addOptionElement("", "", false, "", "", false, false);
    }
    display.addOptionElement("", "", false, "Audio Engine", this.model.getApplication().isEngineActive() ? "Active" : "Off", false, false);
    display.addOptionElement("", "", false, "", "", false, false);
    display.addOptionElement("Project:", "", false, this.model.getProject().getName(), "Previous", false, false);
    display.addOptionElement("", "", false, "", "Next", false, false);
}
Also used : IValueChanger(de.mossgrabers.framework.controller.valuechanger.IValueChanger) ICursorTrack(de.mossgrabers.framework.daw.data.ICursorTrack) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack) IProject(de.mossgrabers.framework.daw.IProject)

Example 3 with IProject

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

the class ProjectModule method execute.

/**
 * {@inheritDoc}
 */
@Override
public void execute(final String command, final LinkedList<String> path, final Object value) throws IllegalParameterException, UnknownCommandException, MissingCommandException {
    if (!"project".equals(command))
        throw new UnknownCommandException(command);
    final String subCommand = getSubCommand(path);
    final IProject project = this.model.getProject();
    switch(subCommand) {
        case "+":
            project.next();
            break;
        case "-":
            project.previous();
            break;
        case "engine":
            if (value == null)
                this.model.getApplication().toggleEngineActive();
            else
                this.model.getApplication().setEngineActive(isTrigger(value));
            break;
        case "save":
            project.save();
            break;
        default:
            throw new UnknownCommandException(subCommand);
    }
}
Also used : UnknownCommandException(de.mossgrabers.controller.osc.exception.UnknownCommandException) IProject(de.mossgrabers.framework.daw.IProject)

Aggregations

IProject (de.mossgrabers.framework.daw.IProject)3 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)2 UnknownCommandException (de.mossgrabers.controller.osc.exception.UnknownCommandException)1 IValueChanger (de.mossgrabers.framework.controller.valuechanger.IValueChanger)1 ICursorTrack (de.mossgrabers.framework.daw.data.ICursorTrack)1