Search in sources :

Example 1 with SendsView

use of de.mossgrabers.launchpad.view.SendsView 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));
}
Also used : RaindropsView(de.mossgrabers.launchpad.view.RaindropsView) SendsView(de.mossgrabers.launchpad.view.SendsView) ViewManager(de.mossgrabers.framework.view.ViewManager) SessionView(de.mossgrabers.launchpad.view.SessionView) PanView(de.mossgrabers.launchpad.view.PanView) DrumView64(de.mossgrabers.launchpad.view.DrumView64) LaunchpadControlSurface(de.mossgrabers.launchpad.controller.LaunchpadControlSurface) DrumView(de.mossgrabers.launchpad.view.DrumView) PlayView(de.mossgrabers.launchpad.view.PlayView) DrumView4(de.mossgrabers.launchpad.view.DrumView4) SequencerView(de.mossgrabers.launchpad.view.SequencerView) DrumView8(de.mossgrabers.launchpad.view.DrumView8) ShiftView(de.mossgrabers.launchpad.view.ShiftView) VolumeView(de.mossgrabers.launchpad.view.VolumeView) DeviceView(de.mossgrabers.launchpad.view.DeviceView) BrowserView(de.mossgrabers.launchpad.view.BrowserView)

Example 2 with SendsView

use of de.mossgrabers.launchpad.view.SendsView 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);
    }
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) ITrackBank(de.mossgrabers.framework.daw.ITrackBank) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) SendsView(de.mossgrabers.launchpad.view.SendsView) ViewManager(de.mossgrabers.framework.view.ViewManager) SessionView(de.mossgrabers.launchpad.view.SessionView) VolumeView(de.mossgrabers.launchpad.view.VolumeView) SessionView(de.mossgrabers.launchpad.view.SessionView) SequencerView(de.mossgrabers.launchpad.view.SequencerView) SceneView(de.mossgrabers.framework.view.SceneView) DeviceView(de.mossgrabers.launchpad.view.DeviceView) View(de.mossgrabers.framework.view.View) PanView(de.mossgrabers.launchpad.view.PanView) RaindropsView(de.mossgrabers.launchpad.view.RaindropsView) BrowserView(de.mossgrabers.launchpad.view.BrowserView) DrumView(de.mossgrabers.launchpad.view.DrumView) SendsView(de.mossgrabers.launchpad.view.SendsView) ShiftView(de.mossgrabers.launchpad.view.ShiftView) PlayView(de.mossgrabers.launchpad.view.PlayView) ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice)

Aggregations

ViewManager (de.mossgrabers.framework.view.ViewManager)2 BrowserView (de.mossgrabers.launchpad.view.BrowserView)2 DeviceView (de.mossgrabers.launchpad.view.DeviceView)2 DrumView (de.mossgrabers.launchpad.view.DrumView)2 PanView (de.mossgrabers.launchpad.view.PanView)2 PlayView (de.mossgrabers.launchpad.view.PlayView)2 RaindropsView (de.mossgrabers.launchpad.view.RaindropsView)2 SendsView (de.mossgrabers.launchpad.view.SendsView)2 SequencerView (de.mossgrabers.launchpad.view.SequencerView)2 SessionView (de.mossgrabers.launchpad.view.SessionView)2 ShiftView (de.mossgrabers.launchpad.view.ShiftView)2 VolumeView (de.mossgrabers.launchpad.view.VolumeView)2 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)1 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)1 ITrackBank (de.mossgrabers.framework.daw.ITrackBank)1 ITrack (de.mossgrabers.framework.daw.data.ITrack)1 SceneView (de.mossgrabers.framework.view.SceneView)1 View (de.mossgrabers.framework.view.View)1 LaunchpadControlSurface (de.mossgrabers.launchpad.controller.LaunchpadControlSurface)1 DrumView4 (de.mossgrabers.launchpad.view.DrumView4)1