Search in sources :

Example 46 with ICursorDevice

use of de.mossgrabers.framework.daw.ICursorDevice in project DrivenByMoss by git-moss.

the class LaunchpadCursorCommand method scrollLeft.

/**
 * {@inheritDoc}
 */
@SuppressWarnings("rawtypes")
@Override
protected void scrollLeft() {
    final ViewManager viewManager = this.surface.getViewManager();
    if (viewManager.isActiveView(Views.VIEW_PLAY)) {
        final Scales scales = this.model.getScales();
        scales.prevScale();
        final String name = scales.getScale().getName();
        this.surface.getConfiguration().setScale(name);
        this.surface.getDisplay().notify(name);
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_DEVICE)) {
        final ICursorDevice cursorDevice = this.model.getCursorDevice();
        cursorDevice.previousParameterPage();
        this.surface.getDisplay().notify(cursorDevice.getSelectedParameterPageName());
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_BROWSER)) {
        this.model.getBrowser().previousContentType();
        return;
    }
    if (viewManager.isActiveView(Views.VIEW_SHIFT) || viewManager.isActiveView(Views.VIEW_DRUM64))
        return;
    // VIEW_SEQUENCER, VIEW_RAINDROPS, VIEW_DRUM, VIEW_DRUM4, VIEW_DRUM8
    final View activeView = viewManager.getActiveView();
    if (activeView instanceof AbstractSequencerView) {
        ((AbstractSequencerView) activeView).onLeft(ButtonEvent.DOWN);
        return;
    }
    // VIEW_SESSION, VIEW_VOLUME, VIEW_PAN, VIEW_SENDS
    this.scrollTracksLeft();
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) Scales(de.mossgrabers.framework.scale.Scales) View(de.mossgrabers.framework.view.View) AbstractSequencerView(de.mossgrabers.framework.view.AbstractSequencerView) RaindropsView(de.mossgrabers.launchpad.view.RaindropsView) PlayView(de.mossgrabers.launchpad.view.PlayView) SequencerView(de.mossgrabers.launchpad.view.SequencerView) DrumView(de.mossgrabers.launchpad.view.DrumView) AbstractSequencerView(de.mossgrabers.framework.view.AbstractSequencerView) ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice)

Example 47 with ICursorDevice

use of de.mossgrabers.framework.daw.ICursorDevice in project DrivenByMoss by git-moss.

the class AbstractDrumView method onActivate.

/**
 * {@inheritDoc}
 */
@Override
public void onActivate() {
    super.onActivate();
    final ICursorDevice primary = this.model.getPrimaryDevice();
    primary.enableObservers(true);
    primary.setDrumPadIndication(true);
}
Also used : ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice)

Example 48 with ICursorDevice

use of de.mossgrabers.framework.daw.ICursorDevice in project DrivenByMoss by git-moss.

the class AbstractDrumView64 method onDeactivate.

/**
 * {@inheritDoc}
 */
@Override
public void onDeactivate() {
    super.onDeactivate();
    final ICursorDevice drumDevice64 = this.model.getDrumDevice64();
    drumDevice64.enableObservers(false);
    drumDevice64.setDrumPadIndication(false);
}
Also used : ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice)

Example 49 with ICursorDevice

use of de.mossgrabers.framework.daw.ICursorDevice in project DrivenByMoss by git-moss.

the class AbstractDrumView64 method onOctaveDown.

/**
 * {@inheritDoc}
 */
@Override
public void onOctaveDown(final ButtonEvent event) {
    if (event != ButtonEvent.DOWN)
        return;
    this.clearPressedKeys();
    final int oldDrumOctave = this.drumOctave;
    this.drumOctave = Math.max(-2, this.drumOctave - 1);
    this.offsetY = DRUM_START_KEY + this.drumOctave * 16;
    this.updateNoteMapping();
    this.surface.getDisplay().notify(this.getDrumRangeText(), true, true);
    if (oldDrumOctave != this.drumOctave) {
        final ICursorDevice drumDevice64 = this.model.getDrumDevice64();
        // TODO Bugfix required: scrollChannelsUp scrolls the whole bank
        for (int i = 0; i < 16; i++) drumDevice64.scrollDrumPadsUp();
    }
}
Also used : ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice)

Example 50 with ICursorDevice

use of de.mossgrabers.framework.daw.ICursorDevice in project DrivenByMoss by git-moss.

the class AbstractDrumView64 method onActivate.

/**
 * {@inheritDoc}
 */
@Override
public void onActivate() {
    super.onActivate();
    final ICursorDevice drumDevice64 = this.model.getDrumDevice64();
    drumDevice64.enableObservers(true);
    drumDevice64.setDrumPadIndication(true);
}
Also used : ICursorDevice(de.mossgrabers.framework.daw.ICursorDevice)

Aggregations

ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)72 IChannel (de.mossgrabers.framework.daw.data.IChannel)25 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)22 ITrack (de.mossgrabers.framework.daw.data.ITrack)19 Display (de.mossgrabers.framework.controller.display.Display)10 ModeManager (de.mossgrabers.framework.mode.ModeManager)9 View (de.mossgrabers.framework.view.View)8 ViewManager (de.mossgrabers.framework.view.ViewManager)8 ITrackBank (de.mossgrabers.framework.daw.ITrackBank)7 IParameter (de.mossgrabers.framework.daw.data.IParameter)6 ITransport (de.mossgrabers.framework.daw.ITransport)5 PushConfiguration (de.mossgrabers.push.PushConfiguration)5 ICursorClip (de.mossgrabers.framework.daw.ICursorClip)4 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)4 SceneView (de.mossgrabers.framework.view.SceneView)4 APCControlSurface (de.mossgrabers.apc.controller.APCControlSurface)3 IBrowser (de.mossgrabers.framework.daw.IBrowser)3 Scales (de.mossgrabers.framework.scale.Scales)3 AbstractSequencerView (de.mossgrabers.framework.view.AbstractSequencerView)3 DrumView (de.mossgrabers.launchpad.view.DrumView)3