use of de.mossgrabers.controller.novation.sl.mode.device.SLParameterMode in project DrivenByMoss by git-moss.
the class SLControllerSetup method createModes.
/**
* {@inheritDoc}
*/
@Override
protected void createModes() {
final SLControlSurface surface = this.getSurface();
final ModeManager modeManager = surface.getModeManager();
modeManager.register(Modes.VOLUME, new SLVolumeMode(surface, this.model));
modeManager.register(Modes.TRACK, new SLTrackMode(surface, this.model));
modeManager.register(Modes.DEVICE_PARAMS, new SLParameterMode(surface, this.model));
modeManager.register(Modes.FIXED, new FixedMode(surface, this.model));
modeManager.register(Modes.FRAME, new FrameMode(surface, this.model));
modeManager.register(Modes.FUNCTIONS, new FunctionMode(surface, this.model));
modeManager.register(Modes.PLAY_OPTIONS, new PlayOptionsMode(surface, this.model));
modeManager.register(Modes.SESSION, new SessionMode(surface, this.model));
modeManager.register(Modes.TRACK_DETAILS, new TrackTogglesMode(surface, this.model));
modeManager.register(Modes.VIEW_SELECT, new ViewSelectMode(surface, this.model));
modeManager.register(Modes.BROWSER, new DevicePresetsMode(surface, this.model));
}
use of de.mossgrabers.controller.novation.sl.mode.device.SLParameterMode in project DrivenByMoss by git-moss.
the class PlayView method onButtonP1.
/**
* {@inheritDoc}
*/
@Override
public void onButtonP1(final boolean isUp, final ButtonEvent event) {
if (event != ButtonEvent.DOWN)
return;
final Modes activeModeId = this.surface.getModeManager().getActiveID();
if (Modes.SESSION == activeModeId) {
if (isUp)
this.model.getSceneBank().selectNextPage();
else
this.model.getSceneBank().selectPreviousPage();
return;
}
if (Modes.VOLUME.equals(activeModeId)) {
new P2ButtonCommand(isUp, this.model, this.surface).execute(ButtonEvent.DOWN, 127);
return;
}
if (Modes.TRACK.equals(activeModeId)) {
new ButtonRowSelectCommand<>(3, this.model, this.surface).execute(ButtonEvent.DOWN, 127);
return;
}
if (Modes.PLAY_OPTIONS.equals(activeModeId))
return;
final SLParameterMode mode = (SLParameterMode) this.surface.getModeManager().get(Modes.DEVICE_PARAMS);
if (isUp)
mode.selectNextItemPage();
else
mode.selectPreviousItemPage();
}
Aggregations