use of de.mossgrabers.framework.daw.data.ITrack in project DrivenByMoss by git-moss.
the class CrossfaderMode method onValueKnobTouch.
/**
* {@inheritDoc}
*/
@Override
public void onValueKnobTouch(final int index, final boolean isTouched) {
this.isKnobTouched[index] = isTouched;
if (isTouched) {
final ITrack t = this.model.getCurrentTrackBank().getTrack(index);
if (t.doesExist()) {
if (this.surface.isDeletePressed()) {
this.surface.setButtonConsumed(this.surface.getDeleteButtonId());
t.setCrossfadeMode("AB");
return;
}
this.surface.getDisplay().notify("Crossfader: " + t.getCrossfadeMode());
}
}
this.checkStopAutomationOnKnobRelease(isTouched);
}
use of de.mossgrabers.framework.daw.data.ITrack in project DrivenByMoss by git-moss.
the class PanMode method onValueKnobTouch.
/**
* {@inheritDoc}
*/
@Override
public void onValueKnobTouch(final int index, final boolean isTouched) {
this.isKnobTouched[index] = isTouched;
final ITrack t = this.model.getCurrentTrackBank().getTrack(index);
if (isTouched) {
if (this.surface.isDeletePressed()) {
this.surface.setButtonConsumed(this.surface.getDeleteButtonId());
t.resetPan();
return;
}
if (t.doesExist())
this.surface.getDisplay().notify("Pan: " + t.getPanStr(8));
}
t.touchPan(isTouched);
this.checkStopAutomationOnKnobRelease(isTouched);
}
use of de.mossgrabers.framework.daw.data.ITrack in project DrivenByMoss by git-moss.
the class SendMode method updateDisplay1.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay1() {
final Display d = this.surface.getDisplay();
final int sendIndex = this.getCurrentSendIndex();
final IChannelBank tb = this.model.getCurrentTrackBank();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getTrack(i);
if (t.doesExist()) {
final ISend send = t.getSend(sendIndex);
d.setCell(0, i, send.getName());
d.setCell(1, i, send.getDisplayedValue(8));
d.setCell(2, i, send.getValue(), Format.FORMAT_VALUE);
} else
d.clearColumn(i);
}
d.done(0).done(1).done(2);
this.drawRow4();
}
use of de.mossgrabers.framework.daw.data.ITrack 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.ITrack in project DrivenByMoss by git-moss.
the class TrackDetailsMode method updateFirstRow.
/**
* {@inheritDoc}
*/
@Override
public void updateFirstRow() {
final ITrack deviceChain = this.getSelectedTrack();
if (deviceChain == null) {
this.disableFirstRow();
return;
}
this.surface.updateButton(20, deviceChain.isActivated() ? this.isPush2 ? PushColors.PUSH2_COLOR_YELLOW_MD : PushColors.PUSH1_COLOR_YELLOW_MD : this.isPush2 ? PushColors.PUSH2_COLOR_YELLOW_LO : PushColors.PUSH1_COLOR_YELLOW_LO);
this.surface.updateButton(21, deviceChain.isRecArm() ? this.isPush2 ? PushColors.PUSH2_COLOR_RED_HI : PushColors.PUSH1_COLOR_RED_HI : this.isPush2 ? PushColors.PUSH2_COLOR_RED_LO : PushColors.PUSH1_COLOR_RED_LO);
this.surface.updateButton(22, deviceChain.isMute() ? this.isPush2 ? PushColors.PUSH2_COLOR_ORANGE_HI : PushColors.PUSH1_COLOR_ORANGE_HI : this.isPush2 ? PushColors.PUSH2_COLOR_ORANGE_LO : PushColors.PUSH1_COLOR_ORANGE_LO);
this.surface.updateButton(23, deviceChain.isSolo() ? this.isPush2 ? PushColors.PUSH2_COLOR_ORANGE_HI : PushColors.PUSH1_COLOR_ORANGE_HI : this.isPush2 ? PushColors.PUSH2_COLOR_ORANGE_LO : PushColors.PUSH1_COLOR_ORANGE_LO);
this.surface.updateButton(24, deviceChain.isMonitor() ? this.isPush2 ? PushColors.PUSH2_COLOR_GREEN_HI : PushColors.PUSH1_COLOR_GREEN_HI : this.isPush2 ? PushColors.PUSH2_COLOR_GREEN_LO : PushColors.PUSH1_COLOR_GREEN_LO);
this.surface.updateButton(25, deviceChain.isAutoMonitor() ? this.isPush2 ? PushColors.PUSH2_COLOR_GREEN_HI : PushColors.PUSH1_COLOR_GREEN_HI : this.isPush2 ? PushColors.PUSH2_COLOR_GREEN_LO : PushColors.PUSH1_COLOR_GREEN_LO);
this.surface.updateButton(26, this.model.isCursorTrackPinned() ? this.isPush2 ? PushColors.PUSH2_COLOR_GREEN_HI : PushColors.PUSH1_COLOR_GREEN_HI : this.isPush2 ? PushColors.PUSH2_COLOR_GREEN_LO : PushColors.PUSH1_COLOR_GREEN_LO);
this.surface.updateButton(27, this.isPush2 ? PushColors.PUSH2_COLOR_GREEN_HI : PushColors.PUSH1_COLOR_GREEN_HI);
}
Aggregations