use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class SendMode 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()) {
final ISend send = t.getSendBank().getItem(this.sendIndex);
display.setCell(0, i, send.getName());
display.setCell(1, i, send.getDisplayedValue(8));
display.setCell(2, i, send.getValue(), Format.FORMAT_VALUE);
}
}
this.drawRow4(display);
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class SendMode method updateDisplay2.
/**
* {@inheritDoc}
*/
@SuppressWarnings("null")
@Override
public void updateDisplay2(final IGraphicDisplay display) {
this.updateTrackMenu(5 + this.sendIndex % 4);
final ITrackBank tb = this.model.getCurrentTrackBank();
final IValueChanger valueChanger = this.model.getValueChanger();
final int sendOffset = this.surface.getConfiguration().isSendsAreToggled() ? 4 : 0;
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getItem(i);
final SendData[] sendData = new SendData[4];
for (int j = 0; j < 4; j++) {
final int sendPos = sendOffset + j;
final ISend send = t.getSendBank().getItem(sendPos);
final boolean exists = send != null && send.doesExist();
sendData[j] = new SendData(exists ? send.getName() : " ", exists && this.sendIndex == sendPos && this.isKnobTouched[i] ? send.getDisplayedValue(8) : "", valueChanger.toDisplayValue(exists ? send.getValue() : -1), valueChanger.toDisplayValue(exists ? send.getModulatedValue() : -1), this.sendIndex == sendPos);
}
final Pair<String, Boolean> pair = this.menu.get(i);
display.addSendsElement(pair.getKey(), pair.getValue().booleanValue(), t.doesExist() ? t.getName() : "", this.updateType(t), t.getColor(), t.isSelected(), sendData, false, t.isActivated(), t.isActivated());
}
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class DeviceLayerMode method handleSendEffect.
/**
* Handle the selection of a send effect.
*
* @param sendIndex The index of the send
*/
protected void handleSendEffect(final int sendIndex) {
if (this.model.isEffectTrackBankActive())
return;
final ITrackBank fxTrackBank = this.model.getEffectTrackBank();
if (fxTrackBank == null || !fxTrackBank.getItem(sendIndex).doesExist())
return;
final Modes si = Modes.get(Modes.DEVICE_LAYER_SEND1, sendIndex);
final ModeManager modeManager = this.surface.getModeManager();
this.setMode(modeManager.isActive(si) ? Modes.DEVICE_LAYER : si);
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class AbstractTrackMode method updateStopMenu.
protected void updateStopMenu() {
final ITrackBank tb = this.model.getCurrentTrackBank();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getItem(i);
this.menu.get(i).set(t.doesExist() ? "Stop Clip" : "", Boolean.valueOf(t.isPlaying()));
}
}
use of de.mossgrabers.framework.daw.data.bank.ITrackBank in project DrivenByMoss by git-moss.
the class AbstractTrackMode method handleSendEffect.
/**
* Handle the selection of a send effect.
*
* @param sendIndex The index of the send
*/
protected void handleSendEffect(final int sendIndex) {
final ITrackBank tb = this.model.getCurrentTrackBank();
if (tb == null || !tb.canEditSend(sendIndex))
return;
final Modes si = Modes.get(Modes.SEND1, sendIndex);
final ModeManager modeManager = this.surface.getModeManager();
modeManager.setActive(modeManager.isActive(si) ? Modes.TRACK : si);
}
Aggregations