Search in sources :

Example 1 with SequencerView

use of de.mossgrabers.launchpad.view.SequencerView 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 SequencerView

use of de.mossgrabers.launchpad.view.SequencerView in project DrivenByMoss by git-moss.

the class LaunchpadCursorCommand method scrollUp.

/**
 * {@inheritDoc}
 */
@Override
protected void scrollUp() {
    final ViewManager viewManager = this.surface.getViewManager();
    if (viewManager.isActiveView(Views.VIEW_PLAY)) {
        ((PlayView) viewManager.getView(Views.VIEW_PLAY)).onOctaveUp(ButtonEvent.DOWN);
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_DRUM)) {
        ((DrumView) viewManager.getView(Views.VIEW_DRUM)).onOctaveUp(ButtonEvent.DOWN);
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_DRUM64)) {
        ((DrumView64) viewManager.getView(Views.VIEW_DRUM64)).onOctaveUp(ButtonEvent.DOWN);
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_SEQUENCER)) {
        ((SequencerView) viewManager.getView(Views.VIEW_SEQUENCER)).onOctaveUp(ButtonEvent.DOWN);
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_RAINDROPS)) {
        ((RaindropsView) viewManager.getView(Views.VIEW_RAINDROPS)).onOctaveUp(ButtonEvent.DOWN);
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_DEVICE)) {
        this.model.getCursorDevice().selectNext();
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_BROWSER) || viewManager.isActiveView(Views.VIEW_SHIFT) || viewManager.isActiveView(Views.VIEW_DRUM4) || viewManager.isActiveView(Views.VIEW_DRUM8))
        return;
    // VIEW_SESSION, VIEW_VOLUME, VIEW_PAN, VIEW_SENDS
    super.scrollUp();
// TODO could be used for layer navigation
// VIEW_DEVICE
}
Also used : AbstractSequencerView(de.mossgrabers.framework.view.AbstractSequencerView) SequencerView(de.mossgrabers.launchpad.view.SequencerView) RaindropsView(de.mossgrabers.launchpad.view.RaindropsView) ViewManager(de.mossgrabers.framework.view.ViewManager) DrumView64(de.mossgrabers.launchpad.view.DrumView64) DrumView(de.mossgrabers.launchpad.view.DrumView) PlayView(de.mossgrabers.launchpad.view.PlayView)

Example 3 with SequencerView

use of de.mossgrabers.launchpad.view.SequencerView in project DrivenByMoss by git-moss.

the class LaunchpadCursorCommand method scrollDown.

/**
 * {@inheritDoc}
 */
@Override
protected void scrollDown() {
    final ViewManager viewManager = this.surface.getViewManager();
    if (viewManager.isActiveView(Views.VIEW_PLAY)) {
        ((PlayView) viewManager.getView(Views.VIEW_PLAY)).onOctaveDown(ButtonEvent.DOWN);
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_DRUM)) {
        ((DrumView) viewManager.getView(Views.VIEW_DRUM)).onOctaveDown(ButtonEvent.DOWN);
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_DRUM64)) {
        ((DrumView64) viewManager.getView(Views.VIEW_DRUM64)).onOctaveDown(ButtonEvent.DOWN);
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_SEQUENCER)) {
        ((SequencerView) viewManager.getView(Views.VIEW_SEQUENCER)).onOctaveDown(ButtonEvent.DOWN);
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_RAINDROPS)) {
        ((RaindropsView) viewManager.getView(Views.VIEW_RAINDROPS)).onOctaveDown(ButtonEvent.DOWN);
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_DEVICE)) {
        this.model.getCursorDevice().selectPrevious();
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_BROWSER) || viewManager.isActiveView(Views.VIEW_SHIFT) || viewManager.isActiveView(Views.VIEW_DRUM4) || viewManager.isActiveView(Views.VIEW_DRUM8))
        return;
    // VIEW_SESSION, VIEW_VOLUME, VIEW_PAN, VIEW_SENDS
    super.scrollDown();
// TODO could be used for layer navigation
// VIEW_DEVICE
}
Also used : AbstractSequencerView(de.mossgrabers.framework.view.AbstractSequencerView) SequencerView(de.mossgrabers.launchpad.view.SequencerView) RaindropsView(de.mossgrabers.launchpad.view.RaindropsView) ViewManager(de.mossgrabers.framework.view.ViewManager) DrumView64(de.mossgrabers.launchpad.view.DrumView64) DrumView(de.mossgrabers.launchpad.view.DrumView) PlayView(de.mossgrabers.launchpad.view.PlayView)

Aggregations

ViewManager (de.mossgrabers.framework.view.ViewManager)3 DrumView (de.mossgrabers.launchpad.view.DrumView)3 DrumView64 (de.mossgrabers.launchpad.view.DrumView64)3 PlayView (de.mossgrabers.launchpad.view.PlayView)3 RaindropsView (de.mossgrabers.launchpad.view.RaindropsView)3 SequencerView (de.mossgrabers.launchpad.view.SequencerView)3 AbstractSequencerView (de.mossgrabers.framework.view.AbstractSequencerView)2 LaunchpadControlSurface (de.mossgrabers.launchpad.controller.LaunchpadControlSurface)1 BrowserView (de.mossgrabers.launchpad.view.BrowserView)1 DeviceView (de.mossgrabers.launchpad.view.DeviceView)1 DrumView4 (de.mossgrabers.launchpad.view.DrumView4)1 DrumView8 (de.mossgrabers.launchpad.view.DrumView8)1 PanView (de.mossgrabers.launchpad.view.PanView)1 SendsView (de.mossgrabers.launchpad.view.SendsView)1 SessionView (de.mossgrabers.launchpad.view.SessionView)1 ShiftView (de.mossgrabers.launchpad.view.ShiftView)1 VolumeView (de.mossgrabers.launchpad.view.VolumeView)1