use of de.mossgrabers.framework.daw.data.IMarker in project DrivenByMoss by git-moss.
the class MarkerModule method flush.
/**
* {@inheritDoc}
*/
@Override
public void flush(final boolean dump) {
final IMarkerBank markerBank = this.model.getMarkerBank();
for (int i = 0; i < markerBank.getPageSize(); i++) {
final String markerAddress = "/marker/" + (i + 1) + "/";
final IMarker marker = markerBank.getItem(i);
this.writer.sendOSC(markerAddress + "exists", marker.doesExist(), dump);
this.writer.sendOSC(markerAddress + TAG_NAME, marker.getName(), dump);
final ColorEx color = marker.getColor();
this.writer.sendOSCColor(markerAddress + "color", color.getRed(), color.getGreen(), color.getBlue(), dump);
}
}
use of de.mossgrabers.framework.daw.data.IMarker in project DrivenByMoss by git-moss.
the class MarkerMode method updateDisplay2.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay2(final IGraphicDisplay display) {
for (int i = 0; i < 8; i++) {
final IMarker marker = this.bank.getItem(i);
final String menuTopName = EDIT_MENU[i];
final String headerBottomName = i == 0 ? "Markers" : "";
final String headerTopName = i == 6 ? "Action" : "";
final boolean isMenuTopSelected = i == 6 && !this.actionModeLaunch || i == 7 && this.actionModeLaunch;
final String menuBottomName = StringUtils.shortenAndFixASCII(getMarkerName(marker), 12);
display.addOptionElement(headerTopName, menuTopName, isMenuTopSelected, null, headerBottomName, menuBottomName, false, marker.getColor(), false);
}
}
use of de.mossgrabers.framework.daw.data.IMarker in project DrivenByMoss by git-moss.
the class MarkerMode method resetParameter.
/**
* {@inheritDoc}
*/
@Override
protected void resetParameter(final int index) {
final int extenderOffset = this.surface.getExtenderOffset();
final IMarker item = this.model.getMarkerBank().getItem(extenderOffset + index);
if (!item.doesExist())
return;
if (this.surface.isShiftPressed())
item.select();
else
item.launch(true);
}
use of de.mossgrabers.framework.daw.data.IMarker in project DrivenByMoss by git-moss.
the class MarkerMode method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1(final ITextDisplay display) {
display.setCell(2, 0, "Markers:");
for (int i = 0; i < 8; i++) {
if (i == 0)
display.setBlock(0, i, EDIT_MENU[i]);
if (i == 6)
display.setCell(0, i, (!this.actionModeLaunch ? Push1Display.SELECT_ARROW : "") + EDIT_MENU[i]);
if (i == 7)
display.setCell(0, i, (this.actionModeLaunch ? Push1Display.SELECT_ARROW : "") + EDIT_MENU[i]);
final IMarker marker = this.bank.getItem(i);
if (marker.doesExist())
display.setCell(3, i, StringUtils.shortenAndFixASCII(getMarkerName(marker), 8));
}
display.setCell(0, 5, "Action:");
}
use of de.mossgrabers.framework.daw.data.IMarker in project DrivenByMoss by git-moss.
the class MarkerMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
final ITextDisplay d = this.surface.getTextDisplay().clear();
final IMarkerBank markerBank = this.model.getMarkerBank();
final int extenderOffset = this.surface.getExtenderOffset();
for (int i = 0; i < 8; i++) {
final IMarker marker = markerBank.getItem(extenderOffset + i);
if (!marker.doesExist())
continue;
final String name = StringUtils.shortenAndFixASCII(marker.getName(), 6);
d.setCell(0, i, name);
}
d.allDone();
}
Aggregations