use of de.mossgrabers.framework.daw.data.ICursorTrack 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();
}
use of de.mossgrabers.framework.daw.data.ICursorTrack 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();
}
Aggregations