use of de.mossgrabers.framework.daw.data.IMasterTrack in project DrivenByMoss by git-moss.
the class MasterMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
if (!this.surface.getConfiguration().hasDisplay1())
return;
this.drawDisplay2();
final Display d = this.surface.getDisplay().clear();
final String projectName = StringUtils.fixASCII(this.model.getProject().getName());
final IMasterTrack master = this.model.getMasterTrack();
final IApplication application = this.model.getApplication();
d.setCell(0, 0, "Volume").setCell(0, 1, "Pan").setBlock(0, 1, "Audio Engine:").setCell(0, 4, application.isEngineActive() ? " On" : " Off");
d.setCell(0, 5, "Prjct:").setBlock(0, 3, projectName);
d.setCell(1, 0, master.getVolumeStr(6)).setCell(1, 1, master.getPanStr(6)).setBlock(1, 1, application.isEngineActive() ? " Turn off" : " Turn on");
d.setCell(1, 6, " <<").setCell(1, 7, " >>").allDone();
}
use of de.mossgrabers.framework.daw.data.IMasterTrack in project DrivenByMoss by git-moss.
the class BaseMode method drawDisplay2.
protected void drawDisplay2() {
if (!this.surface.getConfiguration().hasDisplay2())
return;
final IChannelBank tb = this.model.getCurrentTrackBank();
// Format track names
final Display d2 = this.surface.getSecondDisplay();
final int extenderOffset = this.surface.getExtenderOffset();
final boolean isMainDevice = this.surface.isMainDevice();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getTrack(extenderOffset + i);
d2.setCell(0, i, StringUtils.shortenAndFixASCII(t.getName(), isMainDevice ? 6 : 7));
}
if (isMainDevice)
d2.setCell(0, 8, "Maste");
d2.done(0);
d2.clearRow(1);
if (isMainDevice) {
final IMasterTrack masterTrack = this.model.getMasterTrack();
final ICursorDevice cursorDevice = this.model.getCursorDevice();
final ITrack selectedTrack = masterTrack.isSelected() ? masterTrack : tb.getSelectedTrack();
d2.setBlock(1, 0, "Sel.track: ").setBlock(1, 1, selectedTrack == null ? "None" : StringUtils.fixASCII(selectedTrack.getName()));
d2.setBlock(1, 2, "Sel.devce: ").setBlock(1, 3, cursorDevice.hasSelectedDevice() ? cursorDevice.getName() : "None");
}
d2.done(1);
}
use of de.mossgrabers.framework.daw.data.IMasterTrack in project DrivenByMoss by git-moss.
the class MasterMode method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1() {
final Display d = this.surface.getDisplay();
final IMasterTrack master = this.model.getMasterTrack();
d.setRow(0, MasterMode.PARAM_NAMES).setCell(1, 0, master.getVolumeStr(8)).setCell(1, 1, master.getPanStr(8));
d.clearCell(1, 2).clearCell(1, 3).setBlock(1, 2, "Audio Engine").setBlock(1, 3, this.model.getProject().getName()).done(1);
d.setCell(2, 0, this.surface.getConfiguration().isEnableVUMeters() ? master.getVu() : master.getVolume(), Format.FORMAT_VALUE);
d.setCell(2, 1, master.getPan(), Format.FORMAT_PAN).clearCell(2, 2).clearCell(2, 3).clearCell(2, 4).clearCell(2, 5).clearCell(2, 6).clearCell(2, 7).done(2);
d.setCell(3, 0, master.getName()).clearCell(3, 1).clearCell(3, 2).clearCell(3, 3).setCell(3, 4, this.model.getApplication().isEngineActive() ? "Active" : "Off");
d.clearCell(3, 5).setCell(3, 6, "Previous").setCell(3, 7, "Next").done(3);
}
use of de.mossgrabers.framework.daw.data.IMasterTrack in project DrivenByMoss by git-moss.
the class MasterMode method updateDisplay2.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay2() {
final IMasterTrack master = this.model.getMasterTrack();
final IValueChanger valueChanger = this.model.getValueChanger();
final PushDisplay display = (PushDisplay) this.surface.getDisplay();
final DisplayMessage message = display.createMessage();
message.addChannelElement("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) : "", valueChanger.toDisplayValue(this.surface.getConfiguration().isEnableVUMeters() ? master.getVu() : 0), master.isMute(), master.isSolo(), master.isRecArm(), 0);
for (int i = 1; i < 4; i++) {
message.addChannelSelectorElement(i == 1 ? "Pan" : "", false, "", null, new double[] { 0.0, 0.0, 0.0 }, false);
}
message.addOptionElement("", "", false, "Audio Engine", this.model.getApplication().isEngineActive() ? "Active" : "Off", false, false);
message.addOptionElement("", "", false, "", "", false, false);
message.addOptionElement("Project:", "", false, this.model.getProject().getName(), "Previous", false, false);
message.addOptionElement("", "", false, "", "Next", false, false);
display.send(message);
}
use of de.mossgrabers.framework.daw.data.IMasterTrack in project DrivenByMoss by git-moss.
the class MasterMode method updateSecondRow.
/**
* {@inheritDoc}
*/
@Override
public void updateSecondRow() {
final int off = this.isPush2 ? PushColors.PUSH2_COLOR_BLACK : PushColors.PUSH1_COLOR_BLACK;
if (this.isPush2) {
for (int i = 0; i < 8; i++) this.surface.updateButton(102 + i, off);
return;
}
final boolean muteState = this.surface.getConfiguration().isMuteState();
final IMasterTrack master = this.model.getMasterTrack();
int color = off;
if (muteState) {
if (!master.isMute())
color = this.isPush2 ? PushColors.PUSH2_COLOR2_YELLOW_HI : PushColors.PUSH1_COLOR2_YELLOW_HI;
} else
color = master.isSolo() ? this.isPush2 ? PushColors.PUSH2_COLOR2_BLUE_HI : PushColors.PUSH1_COLOR2_BLUE_HI : this.isPush2 ? PushColors.PUSH2_COLOR2_GREY_LO : PushColors.PUSH1_COLOR2_GREY_LO;
this.surface.updateButton(102, color);
for (int i = 1; i < 8; i++) this.surface.updateButton(102 + i, off);
}
Aggregations