use of de.mossgrabers.framework.daw.IChannelBank in project DrivenByMoss by git-moss.
the class AbstractTrackMode method drawTrackHeader.
protected boolean drawTrackHeader() {
final IChannelBank tb = this.model.getCurrentTrackBank();
final Display d = this.surface.getDisplay().clear();
// Format track names
final int extenderOffset = this.surface.getExtenderOffset();
for (int i = 0; i < 8; i++) {
final ITrack t = tb.getTrack(extenderOffset + i);
final String name = t.getName();
d.setCell(0, i, StringUtils.shortenAndFixASCII(name, 6));
}
d.done(0);
return true;
}
use of de.mossgrabers.framework.daw.IChannelBank in project DrivenByMoss by git-moss.
the class PanMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
if (!this.surface.getConfiguration().hasDisplay1())
return;
this.drawDisplay2();
if (!this.drawTrackHeader())
return;
final Display d = this.surface.getDisplay();
final IChannelBank tb = this.model.getCurrentTrackBank();
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.getPanStr(6));
}
d.done(1);
}
use of de.mossgrabers.framework.daw.IChannelBank in project DrivenByMoss by git-moss.
the class TrackMode method resetParameter.
/**
* {@inheritDoc}
*/
@Override
protected void resetParameter(final int index) {
final IChannelBank tb = this.model.getCurrentTrackBank();
final ITrack selectedTrack = tb.getSelectedTrack();
if (selectedTrack == null)
return;
switch(index) {
case 0:
selectedTrack.resetVolume();
break;
case 1:
selectedTrack.resetPan();
break;
case 2:
if (this.surface.getConfiguration().isDisplayCrossfader())
selectedTrack.setCrossfadeMode("AB");
else if (!this.model.isEffectTrackBankActive())
selectedTrack.getSend(0).resetValue();
break;
default:
if (!this.model.isEffectTrackBankActive())
selectedTrack.getSend(index - (this.surface.getConfiguration().isDisplayCrossfader() ? 3 : 2)).resetValue();
break;
}
}
use of de.mossgrabers.framework.daw.IChannelBank in project DrivenByMoss by git-moss.
the class VolumeMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
if (!this.surface.getConfiguration().hasDisplay1())
return;
this.drawDisplay2();
if (!this.drawTrackHeader())
return;
final Display d = this.surface.getDisplay();
final IChannelBank tb = this.model.getCurrentTrackBank();
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.getVolumeStr(6));
}
d.done(1);
}
use of de.mossgrabers.framework.daw.IChannelBank in project DrivenByMoss by git-moss.
the class DrumViewBase method onScene.
/**
* {@inheritDoc}
*/
@Override
public void onScene(final int index, final ButtonEvent event) {
if (event != ButtonEvent.DOWN || !this.model.canSelectedTrackHoldNotes())
return;
if (!this.surface.isShiftPressed()) {
super.onScene(index, event);
return;
}
final IChannelBank tb = this.model.getCurrentTrackBank();
final ITrack selectedTrack = tb.getSelectedTrack();
if (selectedTrack != null)
this.onLowerScene(index);
}
Aggregations