use of de.mossgrabers.push.mode.device.DeviceBrowserMode in project DrivenByMoss by git-moss.
the class PushCursorCommand method scrollRight.
/**
* {@inheritDoc}
*/
@Override
protected void scrollRight() {
final ModeManager modeManager = this.surface.getModeManager();
if (modeManager.isActiveMode(Modes.MODE_DEVICE_PARAMS)) {
final DeviceParamsMode activeMode = (DeviceParamsMode) modeManager.getActiveMode();
if (this.surface.isShiftPressed())
activeMode.selectNextPageBank();
else
activeMode.selectNextPage();
return;
}
if (modeManager.isActiveMode(Modes.MODE_BROWSER)) {
((DeviceBrowserMode) modeManager.getActiveMode()).resetFilterColumn();
this.model.getBrowser().nextContentType();
return;
}
if (Modes.isLayerMode(modeManager.getActiveModeId())) {
if (this.surface.isShiftPressed())
this.model.getCursorDevice().nextLayerOrDrumPadBank();
else
this.model.getCursorDevice().nextLayerOrDrumPad();
return;
}
this.scrollTracksRight();
}
use of de.mossgrabers.push.mode.device.DeviceBrowserMode in project DrivenByMoss by git-moss.
the class PushControllerSetup method createModes.
/**
* {@inheritDoc}
*/
@Override
protected void createModes() {
final PushControlSurface surface = this.getSurface();
final ModeManager modeManager = surface.getModeManager();
modeManager.registerMode(Modes.MODE_VOLUME, new VolumeMode(surface, this.model));
modeManager.registerMode(Modes.MODE_PAN, new PanMode(surface, this.model));
modeManager.registerMode(Modes.MODE_CROSSFADER, new CrossfaderMode(surface, this.model));
final SendMode modeSend = new SendMode(surface, this.model);
modeManager.registerMode(Modes.MODE_SEND1, modeSend);
modeManager.registerMode(Modes.MODE_SEND2, modeSend);
modeManager.registerMode(Modes.MODE_SEND3, modeSend);
modeManager.registerMode(Modes.MODE_SEND4, modeSend);
modeManager.registerMode(Modes.MODE_SEND5, modeSend);
modeManager.registerMode(Modes.MODE_SEND6, modeSend);
modeManager.registerMode(Modes.MODE_MASTER, new MasterMode(surface, this.model, false));
modeManager.registerMode(Modes.MODE_MASTER_TEMP, new MasterMode(surface, this.model, true));
modeManager.registerMode(Modes.MODE_TRACK, new TrackMode(surface, this.model));
modeManager.registerMode(Modes.MODE_TRACK_DETAILS, new TrackDetailsMode(surface, this.model));
modeManager.registerMode(Modes.MODE_DEVICE_LAYER_DETAILS, new LayerDetailsMode(surface, this.model));
modeManager.registerMode(Modes.MODE_CLIP, new ClipMode(surface, this.model));
modeManager.registerMode(Modes.MODE_NOTE, new NoteMode(surface, this.model));
modeManager.registerMode(Modes.MODE_FRAME, new FrameMode(surface, this.model));
modeManager.registerMode(Modes.MODE_SCALES, new ScalesMode(surface, this.model));
modeManager.registerMode(Modes.MODE_SCALE_LAYOUT, new ScaleLayoutMode(surface, this.model));
modeManager.registerMode(Modes.MODE_ACCENT, new AccentMode(surface, this.model));
modeManager.registerMode(Modes.MODE_FIXED, new FixedMode(surface, this.model));
modeManager.registerMode(Modes.MODE_RIBBON, new RibbonMode(surface, this.model));
modeManager.registerMode(Modes.MODE_GROOVE, new GrooveMode(surface, this.model));
modeManager.registerMode(Modes.MODE_VIEW_SELECT, new NoteViewSelectMode(surface, this.model));
modeManager.registerMode(Modes.MODE_AUTOMATION, new AutomationMode(surface, this.model));
modeManager.registerMode(Modes.MODE_TRANSPORT, new TransportMode(surface, this.model));
modeManager.registerMode(Modes.MODE_DEVICE_PARAMS, new DeviceParamsMode(surface, this.model));
modeManager.registerMode(Modes.MODE_DEVICE_LAYER, new DeviceLayerMode(surface, this.model));
modeManager.registerMode(Modes.MODE_BROWSER, new DeviceBrowserMode(surface, this.model));
modeManager.registerMode(Modes.MODE_DEVICE_LAYER_VOLUME, new DeviceLayerModeVolume(surface, this.model));
modeManager.registerMode(Modes.MODE_DEVICE_LAYER_PAN, new DeviceLayerModePan(surface, this.model));
final DeviceLayerModeSend modeLayerSend = new DeviceLayerModeSend(surface, this.model);
modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND1, modeLayerSend);
modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND2, modeLayerSend);
modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND3, modeLayerSend);
modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND4, modeLayerSend);
modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND5, modeLayerSend);
modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND6, modeLayerSend);
if (this.isPush2) {
modeManager.registerMode(Modes.MODE_SEND7, modeSend);
modeManager.registerMode(Modes.MODE_SEND8, modeSend);
modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND7, modeLayerSend);
modeManager.registerMode(Modes.MODE_DEVICE_LAYER_SEND8, modeLayerSend);
modeManager.registerMode(Modes.MODE_SETUP, new SetupMode(surface, this.model));
modeManager.registerMode(Modes.MODE_INFO, new InfoMode(surface, this.model));
} else
modeManager.registerMode(Modes.MODE_CONFIGURATION, new ConfigurationMode(surface, this.model));
if (this.host.hasClips()) {
modeManager.registerMode(Modes.MODE_SESSION_VIEW_SELECT, new SessionViewSelectMode(surface, this.model));
}
}
use of de.mossgrabers.push.mode.device.DeviceBrowserMode in project DrivenByMoss by git-moss.
the class PushCursorCommand method scrollLeft.
/**
* {@inheritDoc}
*/
@Override
protected void scrollLeft() {
final ModeManager modeManager = this.surface.getModeManager();
if (modeManager.isActiveMode(Modes.MODE_DEVICE_PARAMS)) {
final DeviceParamsMode paramsMode = (DeviceParamsMode) modeManager.getActiveMode();
if (this.surface.isShiftPressed())
paramsMode.selectPreviousPageBank();
else
paramsMode.selectPreviousPage();
return;
}
if (modeManager.isActiveMode(Modes.MODE_BROWSER)) {
((DeviceBrowserMode) modeManager.getActiveMode()).resetFilterColumn();
this.model.getBrowser().previousContentType();
return;
}
if (Modes.isLayerMode(modeManager.getActiveModeId())) {
if (this.surface.isShiftPressed())
this.model.getCursorDevice().previousLayerOrDrumPadBank();
else
this.model.getCursorDevice().previousLayerOrDrumPad();
return;
}
this.scrollTracksLeft();
}
use of de.mossgrabers.push.mode.device.DeviceBrowserMode in project DrivenByMoss by git-moss.
the class RasteredKnobCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute(final int value) {
final ModeManager modeManager = this.surface.getModeManager();
if (modeManager.isActiveMode(Modes.MODE_BROWSER)) {
final DeviceBrowserMode mode = (DeviceBrowserMode) modeManager.getMode(Modes.MODE_BROWSER);
mode.changeSelectedColumnValue(value);
return;
}
this.model.getTransport().changeTempo(value == 1);
}
Aggregations