use of de.mossgrabers.push.controller.PushDisplay in project DrivenByMoss by git-moss.
the class AutomationMode method updateDisplay2.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay2() {
final String writeMode = this.model.getTransport().getAutomationWriteMode();
final PushDisplay display = (PushDisplay) this.surface.getDisplay();
final DisplayMessage message = display.createMessage();
for (int i = 0; i < 8; i++) message.addOptionElement("", "", false, i == 0 ? "Automation Mode" : "", i < ITransport.AUTOMATION_MODES.length ? ITransport.AUTOMATION_MODES[i] : "", i < ITransport.AUTOMATION_MODES.length && ITransport.AUTOMATION_MODES_VALUES[i].equals(writeMode), false);
display.send(message);
}
use of de.mossgrabers.push.controller.PushDisplay in project DrivenByMoss by git-moss.
the class FixedMode method updateDisplay2.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay2() {
final int newClipLength = this.surface.getConfiguration().getNewClipLength();
final PushDisplay display = (PushDisplay) this.surface.getDisplay();
final DisplayMessage message = display.createMessage();
for (int i = 0; i < 8; i++) message.addOptionElement(i == 0 ? "Create Clip (length not stored)" : "", AbstractConfiguration.NEW_CLIP_LENGTH_VALUES[i], false, i == 0 ? "New Clip Length" : "", AbstractConfiguration.NEW_CLIP_LENGTH_VALUES[i], newClipLength == i, false);
display.send(message);
}
use of de.mossgrabers.push.controller.PushDisplay in project DrivenByMoss by git-moss.
the class GrooveMode method updateDisplay2.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay2() {
final IParameter[] parameters = this.model.getGroove().getParameters();
final int quantizeAmount = this.surface.getConfiguration().getQuantizeAmount();
final PushDisplay display = (PushDisplay) this.surface.getDisplay();
final DisplayMessage message = display.createMessage();
message.addParameterElement("Quant Amnt", quantizeAmount * 1023 / 100, quantizeAmount + "%", this.isKnobTouched[0], -1);
message.addOptionElement(" Groove", "", false, "", "", false, false);
for (int i = 0; i < parameters.length; i++) message.addParameterElement(parameters[i].getName(10), parameters[i].getValue(), parameters[i].getDisplayedValue(8), this.isKnobTouched[i], -1);
for (int i = parameters.length; i < 6; i++) message.addEmptyElement();
display.send(message);
}
use of de.mossgrabers.push.controller.PushDisplay in project DrivenByMoss by git-moss.
the class NoteMode method updateDisplay2.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay2() {
final int quarters = (int) Math.floor(this.noteLength);
final int fine = (int) Math.floor(this.noteLength * 100) % 100;
final PushDisplay display = (PushDisplay) this.surface.getDisplay();
final DisplayMessage message = display.createMessage();
message.addParameterElement("Quarters", quarters, Integer.toString(quarters), this.isKnobTouched[0], -1);
message.addParameterElement("Fine", fine, Integer.toString(fine), this.isKnobTouched[1], -1);
final int parameterValue = this.noteVelocity * 1023 / 127;
message.addParameterElement("Velocity", parameterValue, Integer.toString(this.noteVelocity * 100 / 127) + "%", this.isKnobTouched[2], parameterValue);
for (int i = 3; i < 8; i++) message.addOptionElement("", "", false, "", "", false, false);
display.send(message);
}
use of de.mossgrabers.push.controller.PushDisplay in project DrivenByMoss by git-moss.
the class NoteViewSelectMode method updateDisplay2.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay2() {
final ViewManager viewManager = this.surface.getViewManager();
final PushDisplay display = (PushDisplay) this.surface.getDisplay();
final DisplayMessage message = display.createMessage();
for (int i = 0; i < VIEWS.length; i++) {
String menuBottomName = "";
if (VIEWS[i] != null) {
final View view = viewManager.getView(VIEWS[i]);
if (view != null)
menuBottomName = view.getName();
}
final String menuTopName = VIEWS_TOP[i] == null ? "" : viewManager.getView(VIEWS_TOP[i]).getName();
final boolean isMenuBottomSelected = VIEWS[i] != null && viewManager.isActiveView(VIEWS[i]);
final boolean isMenuTopSelected = VIEWS_TOP[i] != null && viewManager.isActiveView(VIEWS_TOP[i]);
message.addOptionElement("", menuTopName, isMenuTopSelected, i == 0 ? "Note view" : "", menuBottomName, isMenuBottomSelected, false);
}
display.send(message);
}
Aggregations