use of de.mossgrabers.framework.daw.data.bank.ITrackBank 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();
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class SessionView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final boolean controlModeIsOff = this.padMode == null;
this.rows = controlModeIsOff ? 2 : 1;
super.drawGrid();
if (controlModeIsOff)
return;
final ITrackBank tb = this.model.getCurrentTrackBank();
final IPadGrid pads = this.surface.getPadGrid();
for (int x = 0; x < this.columns; x++) {
final ITrack track = tb.getItem(x);
if (!track.doesExist()) {
pads.lightEx(x, 1, LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_BLACK);
continue;
}
switch(this.padMode) {
case REC_ARM:
pads.lightEx(x, 1, track.isRecArm() ? LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_RED_HI : LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_RED_LO);
break;
case TRACK_SELECT:
pads.lightEx(x, 1, track.isSelected() ? LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_WHITE : LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_GREY_LO);
break;
case MUTE:
pads.lightEx(x, 1, track.isMute() ? LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_AMBER_HI : LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_AMBER_LO);
break;
case SOLO:
pads.lightEx(x, 1, track.isSolo() ? LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_YELLOW_HI : LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_YELLOW_LO);
break;
case STOP_CLIP:
pads.lightEx(x, 1, LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_ROSE);
break;
default:
// Unused
break;
}
}
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class MaschinePanMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
final ITextDisplay d = this.surface.getTextDisplay();
final ITrackBank tb = this.model.getCurrentTrackBank();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getItem(i);
String name = StringUtils.shortenAndFixASCII(t.getName(), 6);
if (t.isSelected())
name = ">" + name;
d.setCell(0, i, name);
d.setCell(1, i, t.getPanStr(6));
}
d.allDone();
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class MaschineSendMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
final ITextDisplay d = this.surface.getTextDisplay();
final ITrackBank tb = this.model.getCurrentTrackBank();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getItem(i);
final ISend send = t.getSendBank().getItem(this.sendIndex);
String name = StringUtils.shortenAndFixASCII(t.getName(), 6);
if (t.isSelected())
name = ">" + name;
d.setCell(0, i, name);
d.setCell(1, i, send.getDisplayedValue(6));
}
d.allDone();
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class MaschineVolumeMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
final ITextDisplay d = this.surface.getTextDisplay();
final ITrackBank tb = this.model.getCurrentTrackBank();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getItem(i);
String name = StringUtils.shortenAndFixASCII(t.getName(), 6);
if (t.isSelected())
name = ">" + name;
d.setCell(0, i, name);
if (this.displayVU && !this.isKnobTouched[i] && !(this.isKnobTouched[8] && t.isSelected())) {
final int steps = (int) Math.round(this.model.getValueChanger().toNormalizedValue(t.getVu()) * 6);
d.setCell(1, i, StringUtils.pad("", steps, '>'));
} else
d.setCell(1, i, t.getVolumeStr(6));
}
d.allDone();
}
Aggregations