use of de.mossgrabers.framework.daw.IChannelBank in project DrivenByMoss by git-moss.
the class PanMode method updateKnobLEDs.
/**
* {@inheritDoc}
*/
@Override
protected void updateKnobLEDs() {
final IChannelBank tb = this.model.getCurrentTrackBank();
final int upperBound = this.model.getValueChanger().getUpperBound();
final int extenderOffset = this.surface.getExtenderOffset();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getTrack(extenderOffset + i);
this.surface.setKnobLED(i, MCUControlSurface.KNOB_LED_MODE_BOOST_CUT, t.doesExist() ? Math.max(t.getPan(), 1) : upperBound / 2, upperBound);
}
}
use of de.mossgrabers.framework.daw.IChannelBank in project DrivenByMoss by git-moss.
the class PanMode method drawTrackHeader.
/**
* {@inheritDoc}
*/
@Override
protected boolean drawTrackHeader() {
if (!super.drawTrackHeader())
return false;
if (this.surface.getConfiguration().isDisplayTrackNames())
return true;
final IChannelBank tb = this.model.getCurrentTrackBank();
final Display d = this.surface.getDisplay();
final int extenderOffset = this.surface.getExtenderOffset();
for (int i = 0; i < 8; i++) {
if (tb.getTrack(extenderOffset + i).doesExist())
d.setCell(0, i, "Pan");
else
d.clearCell(0, i);
}
d.done(0);
return true;
}
use of de.mossgrabers.framework.daw.IChannelBank in project DrivenByMoss by git-moss.
the class SendMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
if (!this.surface.getConfiguration().hasDisplay1())
return;
if (this.model.isEffectTrackBankActive()) {
this.surface.getModeManager().setActiveMode(Modes.MODE_TRACK);
return;
}
this.drawDisplay2();
if (!this.drawTrackHeader())
return;
final Display d = this.surface.getDisplay();
final int sendIndex = this.getCurrentSendIndex();
final IChannelBank tb = this.model.getCurrentTrackBank();
if (!tb.getTrack(0).getSend(sendIndex).doesExist()) {
d.notify("Send channel " + (sendIndex + 1) + " does not exist.", true, false);
return;
}
final int extenderOffset = this.surface.getExtenderOffset();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getTrack(extenderOffset + i);
d.setCell(1, i, t.getSend(sendIndex).getDisplayedValue(6));
}
d.done(1);
}
use of de.mossgrabers.framework.daw.IChannelBank in project DrivenByMoss by git-moss.
the class SendMode method drawTrackHeader.
/**
* {@inheritDoc}
*/
@Override
protected boolean drawTrackHeader() {
if (this.model.isEffectTrackBankActive()) {
this.surface.getModeManager().setActiveMode(Modes.MODE_TRACK);
return true;
}
if (!super.drawTrackHeader())
return false;
if (this.surface.getConfiguration().isDisplayTrackNames())
return true;
final Display d = this.surface.getDisplay();
final IChannelBank tb = this.model.getCurrentTrackBank();
final int sendIndex = this.getCurrentSendIndex();
final int extenderOffset = this.surface.getExtenderOffset();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getTrack(extenderOffset + i);
if (t.doesExist())
d.setCell(0, i, StringUtils.shortenAndFixASCII(t.getSend(sendIndex).getName(6), 6));
else
d.clearCell(0, i);
}
d.done(0);
return true;
}
use of de.mossgrabers.framework.daw.IChannelBank in project DrivenByMoss by git-moss.
the class SendMode method updateKnobLEDs.
/**
* {@inheritDoc}
*/
@Override
protected void updateKnobLEDs() {
if (this.model.isEffectTrackBankActive()) {
this.surface.getModeManager().setActiveMode(Modes.MODE_TRACK);
return;
}
final IChannelBank tb = this.model.getCurrentTrackBank();
final int upperBound = this.model.getValueChanger().getUpperBound();
final int sendIndex = this.getCurrentSendIndex();
final int extenderOffset = this.surface.getExtenderOffset();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getTrack(extenderOffset + i);
this.surface.setKnobLED(i, MCUControlSurface.KNOB_LED_MODE_WRAP, t.getSend(sendIndex).getValue(), upperBound);
}
}
Aggregations