use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class UserMode method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1(final ITextDisplay display) {
final String[] userPageNames = this.surface.getConfiguration().getUserPageNames();
// Row 1 & 2
for (int i = 0; i < 8; i++) {
final IParameter param = this.bank.getItem(i);
display.setCell(0, i, param.doesExist() ? StringUtils.fixASCII(param.getName()) : "").setCell(1, i, param.getDisplayedValue(8));
}
// Row 3
display.setBlock(2, 0, "User Parameters");
// Row 4
final int pageSize = this.bank.getPageSize();
final int selectedPage = this.bank.getScrollPosition() / pageSize;
for (int i = 0; i < pageSize; i++) display.setCell(3, i, (i == selectedPage ? Push1Display.SELECT_ARROW : "") + userPageNames[i]);
}
use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class CrossfadeMode method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1(final ITextDisplay display) {
final ITrackBank tb = this.model.getCurrentTrackBank();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getItem(i);
if (!t.doesExist())
continue;
display.setCell(0, i, "Crossfdr");
final IParameter crossfadeParameter = t.getCrossfadeParameter();
display.setCell(1, i, CROSSFADE_TEXT.get(crossfadeParameter.getDisplayedValue()));
display.setCell(2, i, crossfadeParameter.getValue(), Format.FORMAT_PAN);
}
this.drawRow4(display);
}
use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class DeviceParamsMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
this.drawDisplay2();
final ITextDisplay d = this.surface.getTextDisplay().clear();
final ICursorDevice cd = this.model.getCursorDevice();
if (!cd.doesExist()) {
d.notify("Please select a device...");
return;
}
// Row 1 & 2
final int extenderOffset = this.surface.getExtenderOffset();
final IParameterBank parameterBank = cd.getParameterBank();
for (int i = 0; i < 8; i++) {
final IParameter param = parameterBank.getItem(extenderOffset + i);
d.setCell(0, i, param.doesExist() ? StringUtils.shortenAndFixASCII(param.getName(6), 6) : "").setCell(1, i, StringUtils.shortenAndFixASCII(param.getDisplayedValue(6), 6));
}
d.allDone();
}
use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class ParametersMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
final SLMkIIIDisplay d = this.surface.getDisplay();
d.clear();
final ICursorDevice cd = this.model.getCursorDevice();
if (!cd.doesExist()) {
d.setBlock(1, 1, " Please select or").setBlock(1, 2, "add a device.");
d.setCell(0, 8, "No device");
d.hideAllElements();
// Row 4
this.drawRow4(d, cd, null);
} else {
final IParameterPageBank parameterPageBank = cd.getParameterPageBank();
final Optional<String> selectedPage = parameterPageBank.getSelectedItem();
d.setCell(0, 8, cd.getName(9)).setCell(1, 8, selectedPage.isPresent() ? selectedPage.get() : "");
// Row 1 & 2
for (int i = 0; i < 8; i++) {
final IParameterBank parameterBank = cd.getParameterBank();
final IParameter param = parameterBank.getItem(i);
d.setCell(0, i, param.doesExist() ? StringUtils.fixASCII(param.getName(9)) : "").setCell(1, i, param.getDisplayedValue(9));
final int color = param.doesExist() ? SLMkIIIColorManager.SLMKIII_PURPLE : SLMkIIIColorManager.SLMKIII_BLACK;
d.setPropertyColor(i, 0, color);
d.setPropertyColor(i, 1, color);
}
// Row 4
this.drawRow4(d, cd, parameterPageBank);
}
this.setButtonInfo(d);
d.allDone();
}
use of de.mossgrabers.framework.daw.data.IParameter in project DrivenByMoss by git-moss.
the class ParameterView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final IPadGrid padGrid = this.surface.getPadGrid();
for (int i = 8; i < 12; i++) padGrid.lightEx(i % 4, 3 - i / 4, AbstractFeatureGroup.BUTTON_COLOR_OFF);
final ICursorDevice cursorDevice = this.model.getCursorDevice();
final boolean doesExist = cursorDevice.doesExist();
padGrid.lightEx(0, 0, doesExist && cursorDevice.canSelectPreviousFX() ? MaschineColorManager.COLOR_ROSE : MaschineColorManager.COLOR_BLACK);
padGrid.lightEx(1, 0, doesExist && cursorDevice.canSelectNextFX() ? MaschineColorManager.COLOR_ROSE : MaschineColorManager.COLOR_BLACK);
final IParameterBank parameterBank = cursorDevice.getParameterBank();
padGrid.lightEx(2, 0, doesExist && parameterBank.canScrollBackwards() ? MaschineColorManager.COLOR_SKIN : MaschineColorManager.COLOR_BLACK);
padGrid.lightEx(3, 0, doesExist && parameterBank.canScrollForwards() ? MaschineColorManager.COLOR_SKIN : MaschineColorManager.COLOR_BLACK);
final SelectedDeviceMode<?, ?> deviceMode = (SelectedDeviceMode<?, ?>) this.surface.getModeManager().get(Modes.DEVICE_PARAMS);
for (int i = 0; i < 8; i++) {
final int x = i % 4;
final int y = 2 + i / 4;
final IParameter item = parameterBank.getItem(i);
if (item.doesExist()) {
final int color = MaschineColorManager.PARAM_COLORS.get(i).intValue();
if (i == deviceMode.getSelectedParameter())
padGrid.lightEx(x, y, color, MaschineColorManager.COLOR_WHITE, false);
else
padGrid.lightEx(x, y, color);
} else
padGrid.lightEx(x, y, AbstractFeatureGroup.BUTTON_COLOR_OFF);
}
}
Aggregations