Search in sources :

Example 1 with PlayView

use of de.mossgrabers.push.view.PlayView 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 2 with PlayView

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

the class PushControllerSetup method registerContinuousCommands.

/**
 * {@inheritDoc}
 */
@Override
protected void registerContinuousCommands() {
    final PushControlSurface surface = this.getSurface();
    for (int i = 0; i < 8; i++) this.addContinuousCommand(Integer.valueOf(Commands.CONT_COMMAND_KNOB1.intValue() + i), PushControlSurface.PUSH_KNOB1 + i, new KnobRowModeCommand<>(i, this.model, surface));
    this.addContinuousCommand(Commands.CONT_COMMAND_MASTER_KNOB, PushControlSurface.PUSH_KNOB9, new MasterVolumeCommand<>(this.model, surface));
    this.addContinuousCommand(Commands.CONT_COMMAND_TEMPO, PushControlSurface.PUSH_SMALL_KNOB1, new RasteredKnobCommand(this.model, surface));
    this.addContinuousCommand(Commands.CONT_COMMAND_PLAY_POSITION, PushControlSurface.PUSH_SMALL_KNOB2, new PlayPositionCommand<>(this.model, surface));
    this.addContinuousCommand(Commands.COMMAND_FOOTSWITCH, PushControlSurface.PUSH_FOOTSWITCH2, new FootswitchCommand<>(this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB1_TOUCH, PushControlSurface.PUSH_KNOB1_TOUCH, new KnobRowTouchModeCommand<>(0, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB2_TOUCH, PushControlSurface.PUSH_KNOB2_TOUCH, new KnobRowTouchModeCommand<>(1, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB3_TOUCH, PushControlSurface.PUSH_KNOB3_TOUCH, new KnobRowTouchModeCommand<>(2, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB4_TOUCH, PushControlSurface.PUSH_KNOB4_TOUCH, new KnobRowTouchModeCommand<>(3, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB5_TOUCH, PushControlSurface.PUSH_KNOB5_TOUCH, new KnobRowTouchModeCommand<>(4, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB6_TOUCH, PushControlSurface.PUSH_KNOB6_TOUCH, new KnobRowTouchModeCommand<>(5, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB7_TOUCH, PushControlSurface.PUSH_KNOB7_TOUCH, new KnobRowTouchModeCommand<>(6, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_KNOB8_TOUCH, PushControlSurface.PUSH_KNOB8_TOUCH, new KnobRowTouchModeCommand<>(7, this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_TEMPO_TOUCH, PushControlSurface.PUSH_SMALL_KNOB1_TOUCH, new SmallKnobTouchCommand(this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_PLAYCURSOR_TOUCH, PushControlSurface.PUSH_SMALL_KNOB2_TOUCH, new SmallKnobTouchCommand(this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_CONFIGURE_PITCHBEND, PushControlSurface.PUSH_RIBBON_TOUCH, new ConfigurePitchbendCommand(this.model, surface));
    this.addNoteCommand(Commands.CONT_COMMAND_MASTERTRACK_TOUCH, PushControlSurface.PUSH_KNOB9_TOUCH, new MastertrackTouchCommand(this.model, surface));
    final ViewManager viewManager = surface.getViewManager();
    viewManager.registerPitchbendCommand(new PitchbendCommand(this.model, surface));
    final PlayView playView = (PlayView) viewManager.getView(Views.VIEW_PLAY);
    playView.registerAftertouchCommand(new AftertouchAbstractPlayViewCommand<>(playView, this.model, surface));
    final PlayView pianoView = (PlayView) viewManager.getView(Views.VIEW_PIANO);
    pianoView.registerAftertouchCommand(new AftertouchAbstractPlayViewCommand<>(pianoView, this.model, surface));
    if (this.host.hasClips()) {
        viewManager.getView(Views.VIEW_SESSION).registerPitchbendCommand(new PitchbendSessionCommand(this.model, surface));
    }
}
Also used : RasteredKnobCommand(de.mossgrabers.push.command.trigger.RasteredKnobCommand) SmallKnobTouchCommand(de.mossgrabers.push.command.continuous.SmallKnobTouchCommand) ViewManager(de.mossgrabers.framework.view.ViewManager) MastertrackTouchCommand(de.mossgrabers.push.command.continuous.MastertrackTouchCommand) PitchbendSessionCommand(de.mossgrabers.push.command.pitchbend.PitchbendSessionCommand) PlayView(de.mossgrabers.push.view.PlayView) ScenePlayView(de.mossgrabers.push.view.ScenePlayView) ConfigurePitchbendCommand(de.mossgrabers.push.command.continuous.ConfigurePitchbendCommand) PitchbendCommand(de.mossgrabers.push.command.pitchbend.PitchbendCommand) ConfigurePitchbendCommand(de.mossgrabers.push.command.continuous.ConfigurePitchbendCommand) PushControlSurface(de.mossgrabers.push.controller.PushControlSurface) KnobRowModeCommand(de.mossgrabers.framework.command.continuous.KnobRowModeCommand)

Aggregations

ViewManager (de.mossgrabers.framework.view.ViewManager)2 PushControlSurface (de.mossgrabers.push.controller.PushControlSurface)2 PlayView (de.mossgrabers.push.view.PlayView)2 ScenePlayView (de.mossgrabers.push.view.ScenePlayView)2 KnobRowModeCommand (de.mossgrabers.framework.command.continuous.KnobRowModeCommand)1 AbstractSequencerView (de.mossgrabers.framework.view.AbstractSequencerView)1 ConfigurePitchbendCommand (de.mossgrabers.push.command.continuous.ConfigurePitchbendCommand)1 MastertrackTouchCommand (de.mossgrabers.push.command.continuous.MastertrackTouchCommand)1 SmallKnobTouchCommand (de.mossgrabers.push.command.continuous.SmallKnobTouchCommand)1 PitchbendCommand (de.mossgrabers.push.command.pitchbend.PitchbendCommand)1 PitchbendSessionCommand (de.mossgrabers.push.command.pitchbend.PitchbendSessionCommand)1 RasteredKnobCommand (de.mossgrabers.push.command.trigger.RasteredKnobCommand)1 ClipView (de.mossgrabers.push.view.ClipView)1 ColorView (de.mossgrabers.push.view.ColorView)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 PrgChangeView (de.mossgrabers.push.view.PrgChangeView)1