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();
}
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);
}
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);
}
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();
}
}
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);
}
Aggregations