use of de.mossgrabers.launchpad.view.PlayView 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));
}
use of de.mossgrabers.launchpad.view.PlayView 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
}
use of de.mossgrabers.launchpad.view.PlayView 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
}
use of de.mossgrabers.launchpad.view.PlayView in project DrivenByMoss by git-moss.
the class LaunchpadControllerSetup method registerContinuousCommands.
/**
* {@inheritDoc}
*/
@Override
protected void registerContinuousCommands() {
final LaunchpadControlSurface surface = this.getSurface();
for (int i = 0; i < 8; i++) this.addContinuousCommand(Integer.valueOf(Commands.CONT_COMMAND_KNOB1.intValue() + i), LaunchpadControlSurface.LAUNCHPAD_FADER_1 + i, new FaderCommand(i, this.model, surface));
final PlayView playView = (PlayView) surface.getViewManager().getView(Views.VIEW_PLAY);
playView.registerAftertouchCommand(new AftertouchAbstractPlayViewCommand<>(playView, this.model, surface));
}
Aggregations