use of de.mossgrabers.framework.daw.data.ISend in project DrivenByMoss by git-moss.
the class SendMode method onValueKnobTouch.
/**
* {@inheritDoc}
*/
@Override
public void onValueKnobTouch(final int index, final boolean isTouched) {
final int sendIndex = this.getCurrentSendIndex();
this.isKnobTouched[index] = isTouched;
final ITrack t = this.model.getCurrentTrackBank().getTrack(index);
final ISend send = t.getSend(sendIndex);
if (isTouched) {
if (this.surface.isDeletePressed()) {
this.surface.setButtonConsumed(this.surface.getDeleteButtonId());
send.resetValue();
return;
}
final IChannelBank fxTrackBank = this.model.getEffectTrackBank();
if (t.doesExist())
this.surface.getDisplay().notify("Send " + (fxTrackBank == null ? send.getName() : fxTrackBank.getTrack(sendIndex).getName()) + ": " + send.getValue());
}
send.touchValue(isTouched);
this.checkStopAutomationOnKnobRelease(isTouched);
}
use of de.mossgrabers.framework.daw.data.ISend in project DrivenByMoss by git-moss.
the class DeviceLayerMode method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1() {
final Display d = this.surface.getDisplay().clear();
final ICursorDevice cd = this.model.getCursorDevice();
if (!cd.hasSelectedDevice()) {
d.setBlock(1, 0, " Select").setBlock(1, 1, "a device or press").setBlock(1, 2, "'Add Effect'... ").allDone();
return;
}
final boolean noLayers = cd.hasLayers() && cd.hasZeroLayers();
if (noLayers) {
d.setBlock(1, 1, " Please create").setBlock(1, 2, cd.hasDrumPads() ? "a Drum Pad..." : "a Device Layer...");
} else {
final IChannel l = cd.getSelectedLayerOrDrumPad();
if (l != null) {
d.setCell(0, 0, "Volume").setCell(1, 0, l.getVolumeStr(8)).setCell(2, 0, this.surface.getConfiguration().isEnableVUMeters() ? l.getVu() : l.getVolume(), Format.FORMAT_VALUE);
d.setCell(0, 1, "Pan").setCell(1, 1, l.getPanStr(8)).setCell(2, 1, l.getPan(), Format.FORMAT_PAN);
final IChannelBank fxTrackBank = this.model.getEffectTrackBank();
if (fxTrackBank == null) {
for (int i = 0; i < 6; i++) {
final int pos = 2 + i;
final ISend send = l.getSend(i);
d.setCell(0, pos, send.getName()).setCell(1, pos, send.getDisplayedValue(8)).setCell(2, pos, send.getValue(), Format.FORMAT_VALUE);
}
} else {
final boolean isFX = this.model.isEffectTrackBankActive();
for (int i = 0; i < 6; i++) {
final ITrack fxTrack = fxTrackBank.getTrack(i);
final boolean isEmpty = isFX || !fxTrack.doesExist();
final int pos = 2 + i;
if (isEmpty) {
d.clearCell(0, pos);
d.clearCell(2, pos);
} else {
final ISend send = l.getSend(i);
d.setCell(0, pos, fxTrack.getName()).setCell(1, pos, send.getDisplayedValue(8));
d.setCell(2, pos, send.getValue(), Format.FORMAT_VALUE);
}
}
}
}
}
this.drawRow4(d, cd);
}
use of de.mossgrabers.framework.daw.data.ISend in project DrivenByMoss by git-moss.
the class DeviceLayerModeSend method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1() {
final Display d = this.surface.getDisplay();
final ICursorDevice cd = this.model.getCursorDevice();
// Drum Pad Bank has size of 16, layers only 8
final int offset = getDrumPadIndex(cd);
final int sendIndex = this.getCurrentSendIndex();
for (int i = 0; i < 8; i++) {
final IChannel layer = cd.getLayerOrDrumPad(offset + i);
final boolean exists = layer.doesExist();
final ISend send = layer.getSend(sendIndex);
d.setCell(0, i, exists ? send.getName() : "").setCell(1, i, send.getDisplayedValue(8));
if (exists)
d.setCell(2, i, send.getValue(), Format.FORMAT_VALUE);
else
d.clearCell(2, i);
}
d.done(0).done(1).done(2);
this.drawRow4(d, cd);
}
use of de.mossgrabers.framework.daw.data.ISend in project DrivenByMoss by git-moss.
the class TrackMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
final IChannelBank currentTrackBank = this.model.getCurrentTrackBank();
final ITrack t = currentTrackBank.getSelectedTrack();
final Display d = this.surface.getDisplay();
if (t == null) {
d.setRow(0, " Please select a track... ").clearRow(2).done(2);
return;
}
d.setCell(0, 0, "Volume").setCell(2, 0, t.getVolumeStr(8)).setCell(0, 1, "Pan").setCell(2, 1, t.getPanStr(8));
int sendStart = 2;
int sendCount = 6;
if (this.surface.getConfiguration().isDisplayCrossfader()) {
sendStart = 3;
sendCount = 5;
final String crossfadeMode = t.getCrossfadeMode();
d.setCell(0, 2, "Crossfdr").setCell(2, 2, "A".equals(crossfadeMode) ? "A" : "B".equals(crossfadeMode) ? " B" : " <> ");
}
final IChannelBank fxTrackBank = this.model.getEffectTrackBank();
int pos;
if (fxTrackBank != null) {
final boolean isFX = this.model.isEffectTrackBankActive();
for (int i = 0; i < sendCount; i++) {
final ITrack fxTrack = fxTrackBank.getTrack(i);
final boolean isEmpty = isFX || !fxTrack.doesExist();
pos = sendStart + i;
d.setCell(0, pos, isEmpty ? "" : fxTrack.getName()).setCell(2, pos, isEmpty ? "" : t.getSend(i).getDisplayedValue(8));
}
if (isFX)
d.setCell(0, 7, t.getName());
} else {
for (int i = 0; i < sendCount; i++) {
pos = sendStart + i;
final ISend send = t.getSend(i);
d.setCell(0, pos, send.getName(8)).setCell(2, pos, send.getDisplayedValue(8));
}
}
d.done(0).done(2);
}
use of de.mossgrabers.framework.daw.data.ISend 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);
}
Aggregations