use of de.mossgrabers.launchpad.view.SessionView in project DrivenByMoss by git-moss.
the class LaunchpadControllerSetup method createViews.
/**
* {@inheritDoc}
*/
@Override
protected void createViews() {
final LaunchpadControlSurface surface = this.getSurface();
final ViewManager viewManager = surface.getViewManager();
viewManager.registerView(Views.VIEW_BROWSER, new BrowserView(surface, this.model));
viewManager.registerView(Views.VIEW_DEVICE, new DeviceView(surface, this.model));
viewManager.registerView(Views.VIEW_DRUM, new DrumView(surface, this.model));
viewManager.registerView(Views.VIEW_DRUM4, new DrumView4(surface, this.model));
viewManager.registerView(Views.VIEW_DRUM8, new DrumView8(surface, this.model));
viewManager.registerView(Views.VIEW_PAN, new PanView(surface, this.model));
viewManager.registerView(Views.VIEW_DRUM64, new DrumView64(surface, this.model));
viewManager.registerView(Views.VIEW_PLAY, new PlayView(surface, this.model));
viewManager.registerView(Views.VIEW_RAINDROPS, new RaindropsView(surface, this.model));
viewManager.registerView(Views.VIEW_SENDS, new SendsView(surface, this.model));
viewManager.registerView(Views.VIEW_SEQUENCER, new SequencerView(surface, this.model));
viewManager.registerView(Views.VIEW_SESSION, new SessionView(surface, this.model));
viewManager.registerView(Views.VIEW_VOLUME, new VolumeView(surface, this.model));
viewManager.registerView(Views.VIEW_SHIFT, new ShiftView(surface, this.model));
}
use of de.mossgrabers.launchpad.view.SessionView 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);
}
}
Aggregations