use of de.mossgrabers.framework.daw.ITrackBank in project DrivenByMoss by git-moss.
the class APCControllerSetup method updateIndication.
private void updateIndication(final Integer mode) {
final ITrackBank tb = this.model.getTrackBank();
final IChannelBank tbe = this.model.getEffectTrackBank();
final APCControlSurface surface = this.getSurface();
final boolean isSession = surface.getViewManager().isActiveView(Views.VIEW_SESSION);
final boolean isEffect = this.model.isEffectTrackBankActive();
final boolean isPan = mode == Modes.MODE_PAN;
tb.setIndication(!isEffect && isSession);
tbe.setIndication(isEffect && isSession);
final ICursorDevice cursorDevice = this.model.getCursorDevice();
for (int i = 0; i < 8; i++) {
final ITrack track = tb.getTrack(i);
track.setVolumeIndication(!isEffect);
track.setPanIndication(!isEffect && isPan);
for (int j = 0; j < 8; j++) track.getSend(j).setIndication(!isEffect && (mode == Modes.MODE_SEND1 && j == 0 || mode == Modes.MODE_SEND2 && j == 1 || mode == Modes.MODE_SEND3 && j == 2 || mode == Modes.MODE_SEND4 && j == 3 || mode == Modes.MODE_SEND5 && j == 4 || mode == Modes.MODE_SEND6 && j == 5 || mode == Modes.MODE_SEND7 && j == 6 || mode == Modes.MODE_SEND8 && j == 7));
final ITrack fxTrack = tbe.getTrack(i);
fxTrack.setVolumeIndication(isEffect);
fxTrack.setPanIndication(isEffect && isPan);
cursorDevice.indicateParameter(i, true);
}
}
use of de.mossgrabers.framework.daw.ITrackBank in project DrivenByMoss by git-moss.
the class APCminiControllerSetup method createModel.
/**
* {@inheritDoc}
*/
@Override
protected void createModel() {
this.model = this.factory.createModel(this.colorManager, this.valueChanger, this.scales, 8, 8, 8, 16, 16, true, -1, -1, -1, -1);
final ITrackBank trackBank = this.model.getTrackBank();
trackBank.setIndication(true);
trackBank.addTrackSelectionObserver(this::handleTrackChange);
}
use of de.mossgrabers.framework.daw.ITrackBank in project DrivenByMoss by git-moss.
the class LaunchpadControllerSetup method createModel.
/**
* {@inheritDoc}
*/
@Override
protected void createModel() {
this.model = this.factory.createModel(this.colorManager, this.valueChanger, this.scales, 8, 8, 8, 16, 16, true, -1, -1, -1, -1);
final ITrackBank trackBank = this.model.getTrackBank();
trackBank.addTrackSelectionObserver(this::handleTrackChange);
}
use of de.mossgrabers.framework.daw.ITrackBank in project DrivenByMoss by git-moss.
the class LaunchpadControllerSetup method updateIndication.
private void updateIndication() {
final ViewManager viewManager = this.getSurface().getViewManager();
final boolean isVolume = viewManager.isActiveView(Views.VIEW_VOLUME);
final boolean isPan = viewManager.isActiveView(Views.VIEW_PAN);
final boolean isSends = viewManager.isActiveView(Views.VIEW_SENDS);
final boolean isDevice = viewManager.isActiveView(Views.VIEW_DEVICE);
final ITrackBank tb = this.model.getTrackBank();
final IChannelBank tbe = this.model.getEffectTrackBank();
final ICursorDevice cursorDevice = this.model.getCursorDevice();
final View view = viewManager.getActiveView();
final int selSend = view instanceof SendsView ? ((SendsView) view).getSelectedSend() : -1;
final boolean isSession = view instanceof SessionView && !isVolume && !isPan && !isSends;
final boolean isEffect = this.model.isEffectTrackBankActive();
tb.setIndication(!isEffect && isSession);
tbe.setIndication(isEffect && isSession);
for (int i = 0; i < 8; i++) {
final ITrack track = tb.getTrack(i);
track.setVolumeIndication(!isEffect && isVolume);
track.setPanIndication(!isEffect && isPan);
for (int j = 0; j < 8; j++) track.getSend(j).setIndication(!isEffect && isSends && selSend == j);
final ITrack fxTrack = tbe.getTrack(i);
fxTrack.setVolumeIndication(isEffect && isVolume);
fxTrack.setPanIndication(isEffect && isPan);
cursorDevice.indicateParameter(i, isDevice);
}
}
use of de.mossgrabers.framework.daw.ITrackBank in project DrivenByMoss by git-moss.
the class AbstractTrackMode method updateTrackMenu.
protected void updateTrackMenu() {
final PushConfiguration config = this.surface.getConfiguration();
final int sendOffset = config.isSendsAreToggled() ? 4 : 0;
if (this.model.isEffectTrackBankActive()) {
// No sends for FX tracks
for (int i = 3; i < 7; i++) this.menu[i] = " ";
return;
}
this.menu[2] = config.isDisplayCrossfader() ? "Crossfader" : " ";
final IChannelBank tb = this.model.getCurrentTrackBank();
for (int i = 0; i < 3; i++) {
this.menu[4 + i] = tb.getEditSendName(sendOffset + i);
if (this.menu[4 + i].isEmpty())
this.menu[4 + i] = " ";
}
this.menu[3] = config.isSendsAreToggled() ? "Sends 5-8" : "Sends 1-4";
this.menu[7] = tb instanceof ITrackBank && ((ITrackBank) tb).hasParent() ? "Up" : " ";
}
Aggregations