Search in sources :

Example 1 with ColorView

use of de.mossgrabers.push.view.ColorView in project DrivenByMoss by git-moss.

the class TrackDetailsMode method onFirstRowTrack.

private void onFirstRowTrack(final int index) {
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final ITrack t = tb.getSelectedTrack();
    if (t == null)
        return;
    switch(index) {
        case 0:
            t.toggleIsActivated();
            break;
        case 1:
            t.toggleRecArm();
            break;
        case 2:
            t.toggleMute();
            break;
        case 3:
            t.toggleSolo();
            break;
        case 4:
            t.toggleMonitor();
            break;
        case 5:
            t.toggleAutoMonitor();
            break;
        case 6:
            this.model.toggleCursorTrackPinned();
            break;
        case 7:
            final ViewManager viewManager = this.surface.getViewManager();
            ((ColorView) viewManager.getView(Views.VIEW_COLOR)).setMode(ColorView.SelectMode.MODE_TRACK);
            viewManager.setActiveView(Views.VIEW_COLOR);
            break;
    }
}
Also used : ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) ViewManager(de.mossgrabers.framework.view.ViewManager) ColorView(de.mossgrabers.push.view.ColorView)

Example 2 with ColorView

use of de.mossgrabers.push.view.ColorView in project DrivenByMoss by git-moss.

the class PushControllerSetup method createViews.

/**
 * {@inheritDoc}
 */
@Override
protected void createViews() {
    final PushControlSurface surface = this.getSurface();
    final ViewManager viewManager = surface.getViewManager();
    viewManager.registerView(Views.VIEW_PLAY, new PlayView(surface, this.model));
    viewManager.registerView(Views.VIEW_PIANO, new PianoView(surface, this.model));
    viewManager.registerView(Views.VIEW_PRG_CHANGE, new PrgChangeView(surface, this.model));
    viewManager.registerView(Views.VIEW_CLIP, new ClipView(surface, this.model));
    viewManager.registerView(Views.VIEW_COLOR, new ColorView(surface, this.model));
    if (this.host.hasClips()) {
        viewManager.registerView(Views.VIEW_SESSION, new SessionView(surface, this.model));
        viewManager.registerView(Views.VIEW_SEQUENCER, new SequencerView(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_DRUM64, new DrumView64(surface, this.model));
        viewManager.registerView(Views.VIEW_RAINDROPS, new RaindropsView(surface, this.model));
        viewManager.registerView(Views.VIEW_SCENE_PLAY, new ScenePlayView(surface, this.model));
    }
}
Also used : RaindropsView(de.mossgrabers.push.view.RaindropsView) ViewManager(de.mossgrabers.framework.view.ViewManager) SessionView(de.mossgrabers.push.view.SessionView) ScenePlayView(de.mossgrabers.push.view.ScenePlayView) PrgChangeView(de.mossgrabers.push.view.PrgChangeView) ColorView(de.mossgrabers.push.view.ColorView) DrumView64(de.mossgrabers.push.view.DrumView64) DrumView(de.mossgrabers.push.view.DrumView) PlayView(de.mossgrabers.push.view.PlayView) ScenePlayView(de.mossgrabers.push.view.ScenePlayView) DrumView4(de.mossgrabers.push.view.DrumView4) SequencerView(de.mossgrabers.push.view.SequencerView) AbstractSequencerView(de.mossgrabers.framework.view.AbstractSequencerView) DrumView8(de.mossgrabers.push.view.DrumView8) PianoView(de.mossgrabers.push.view.PianoView) ClipView(de.mossgrabers.push.view.ClipView) PushControlSurface(de.mossgrabers.push.controller.PushControlSurface)

Example 3 with ColorView

use of de.mossgrabers.push.view.ColorView in project DrivenByMoss by git-moss.

the class ClipMode method onSecondRow.

/**
 * {@inheritDoc}
 */
@Override
public void onSecondRow(final int index, final ButtonEvent event) {
    if (event != ButtonEvent.DOWN)
        return;
    if (index != 7)
        return;
    final ViewManager viewManager = this.surface.getViewManager();
    ((ColorView) viewManager.getView(Views.VIEW_COLOR)).setMode(SelectMode.MODE_CLIP);
    viewManager.setActiveView(Views.VIEW_COLOR);
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) ColorView(de.mossgrabers.push.view.ColorView)

Example 4 with ColorView

use of de.mossgrabers.push.view.ColorView in project DrivenByMoss by git-moss.

the class LayerDetailsMode method onFirstRow.

/**
 * {@inheritDoc}
 */
@Override
public void onFirstRow(final int index, final ButtonEvent event) {
    if (event != ButtonEvent.UP)
        return;
    final IChannel deviceChain = this.model.getCursorDevice().getSelectedLayerOrDrumPad();
    if (deviceChain == null)
        return;
    switch(index) {
        case 0:
            this.model.getCursorDevice().toggleLayerOrDrumPadIsActivated(deviceChain.getIndex());
            break;
        case 2:
            this.model.getCursorDevice().toggleLayerOrDrumPadMute(deviceChain.getIndex());
            break;
        case 3:
            this.model.getCursorDevice().toggleLayerOrDrumPadSolo(deviceChain.getIndex());
            break;
        case 7:
            final ViewManager viewManager = this.surface.getViewManager();
            ((ColorView) viewManager.getView(Views.VIEW_COLOR)).setMode(ColorView.SelectMode.MODE_LAYER);
            viewManager.setActiveView(Views.VIEW_COLOR);
            break;
        default:
            // Not used
            break;
    }
}
Also used : IChannel(de.mossgrabers.framework.daw.data.IChannel) ViewManager(de.mossgrabers.framework.view.ViewManager) ColorView(de.mossgrabers.push.view.ColorView)

Example 5 with ColorView

use of de.mossgrabers.push.view.ColorView in project DrivenByMoss by git-moss.

the class TrackDetailsMode method onFirstRowMasterTrack.

private void onFirstRowMasterTrack(final int index) {
    switch(index) {
        case 0:
            this.model.getMasterTrack().toggleIsActivated();
            break;
        case 1:
            this.model.getMasterTrack().toggleRecArm();
            break;
        case 2:
            this.model.getMasterTrack().toggleMute();
            break;
        case 3:
            this.model.getMasterTrack().toggleSolo();
            break;
        case 4:
            this.model.getMasterTrack().toggleMonitor();
            break;
        case 5:
            this.model.getMasterTrack().toggleAutoMonitor();
            break;
        case 6:
            // Not used
            break;
        case 7:
            final ViewManager viewManager = this.surface.getViewManager();
            ((ColorView) viewManager.getView(Views.VIEW_COLOR)).setMode(ColorView.SelectMode.MODE_TRACK);
            viewManager.setActiveView(Views.VIEW_COLOR);
            break;
    }
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) ColorView(de.mossgrabers.push.view.ColorView)

Aggregations

ViewManager (de.mossgrabers.framework.view.ViewManager)5 ColorView (de.mossgrabers.push.view.ColorView)5 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)1 IChannel (de.mossgrabers.framework.daw.data.IChannel)1 ITrack (de.mossgrabers.framework.daw.data.ITrack)1 AbstractSequencerView (de.mossgrabers.framework.view.AbstractSequencerView)1 PushControlSurface (de.mossgrabers.push.controller.PushControlSurface)1 ClipView (de.mossgrabers.push.view.ClipView)1 DrumView (de.mossgrabers.push.view.DrumView)1 DrumView4 (de.mossgrabers.push.view.DrumView4)1 DrumView64 (de.mossgrabers.push.view.DrumView64)1 DrumView8 (de.mossgrabers.push.view.DrumView8)1 PianoView (de.mossgrabers.push.view.PianoView)1 PlayView (de.mossgrabers.push.view.PlayView)1 PrgChangeView (de.mossgrabers.push.view.PrgChangeView)1 RaindropsView (de.mossgrabers.push.view.RaindropsView)1 ScenePlayView (de.mossgrabers.push.view.ScenePlayView)1 SequencerView (de.mossgrabers.push.view.SequencerView)1 SessionView (de.mossgrabers.push.view.SessionView)1