use of de.mossgrabers.sl.controller.SLControlSurface in project DrivenByMoss by git-moss.
the class SLControllerSetup method startup.
/**
* {@inheritDoc}
*/
@Override
public void startup() {
// Initialise 2nd display
final SLControlSurface surface = this.getSurface();
surface.getModeManager().getMode(Modes.MODE_VOLUME).updateDisplay();
surface.getViewManager().setActiveView(Views.VIEW_CONTROL);
surface.getModeManager().setActiveMode(Modes.MODE_TRACK);
}
use of de.mossgrabers.sl.controller.SLControlSurface in project DrivenByMoss by git-moss.
the class SLControllerSetup method updateIndication.
private void updateIndication() {
final SLControlSurface surface = this.getSurface();
final Integer mode = surface.getModeManager().getActiveModeId();
final IMasterTrack mt = this.model.getMasterTrack();
mt.setVolumeIndication(Modes.MODE_MASTER.equals(mode));
mt.setPanIndication(Modes.MODE_MASTER.equals(mode));
final ITrackBank tb = this.model.getTrackBank();
final IChannelBank tbe = this.model.getEffectTrackBank();
final boolean isEffect = this.model.isEffectTrackBankActive();
final boolean isVolume = Modes.MODE_VOLUME.equals(mode);
final ICursorDevice cursorDevice = this.model.getCursorDevice();
final ITrack selectedTrack = tb.getSelectedTrack();
for (int i = 0; i < 8; i++) {
final boolean hasTrackSel = selectedTrack != null && selectedTrack.getIndex() == i && Modes.MODE_TRACK.equals(mode);
final ITrack track = tb.getTrack(i);
track.setVolumeIndication(!isEffect && (isVolume || hasTrackSel));
track.setPanIndication(!isEffect && hasTrackSel);
for (int j = 0; j < 6; j++) track.getSend(j).setIndication(!isEffect && hasTrackSel);
final ITrack fxTrack = tbe.getTrack(i);
fxTrack.setVolumeIndication(isEffect);
fxTrack.setPanIndication(isEffect);
cursorDevice.indicateParameter(i, true);
}
}
Aggregations