use of de.mossgrabers.controller.novation.slmkiii.mode.device.ParametersMode in project DrivenByMoss by git-moss.
the class SLMkIIIControllerSetup method createModes.
/**
* {@inheritDoc}
*/
@Override
protected void createModes() {
final SLMkIIIControlSurface surface = this.getSurface();
final ModeManager modeManager = surface.getModeManager();
// Required for button combinations in modes
this.addButton(ButtonID.DELETE, "Clear", NopCommand.INSTANCE, 15, SLMkIIIControlSurface.MKIII_CLEAR, () -> surface.isPressed(ButtonID.DELETE) ? SLMkIIIColorManager.SLMKIII_AMBER : SLMkIIIColorManager.SLMKIII_AMBER_HALF);
modeManager.register(Modes.TRACK, new SLMkIIITrackMode(surface, this.model));
modeManager.register(Modes.VOLUME, new SLMkIIIVolumeMode(surface, this.model));
modeManager.register(Modes.PAN, new SLMkIIIPanMode(surface, this.model));
for (int i = 0; i < 8; i++) modeManager.register(Modes.get(Modes.SEND1, i), new SLMkIIISendMode(i, surface, this.model));
modeManager.register(Modes.DEVICE_PARAMS, new ParametersMode(surface, this.model));
modeManager.register(Modes.BROWSER, new BrowserMode(surface, this.model));
modeManager.register(Modes.USER, new UserMode(surface, this.model));
modeManager.register(Modes.FUNCTIONS, new OptionsMode(surface, this.model));
modeManager.register(Modes.GROOVE, new SequencerResolutionMode(surface, this.model));
modeManager.register(Modes.NOTE, new NoteMode(surface, this.model));
}
use of de.mossgrabers.controller.novation.slmkiii.mode.device.ParametersMode in project DrivenByMoss by git-moss.
the class DeviceModeCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute(final ButtonEvent event, final int velocity) {
if (event != ButtonEvent.UP)
return;
final IBrowser browser = this.model.getBrowser();
if (browser != null && browser.isActive())
browser.stopBrowsing(!this.surface.isShiftPressed());
final ModeManager modeManager = this.surface.getModeManager();
if (modeManager.isActive(Modes.DEVICE_PARAMS)) {
final ParametersMode parametersMode = (ParametersMode) modeManager.get(Modes.DEVICE_PARAMS);
parametersMode.setShowDevices(!parametersMode.isShowDevices());
return;
}
this.deviceModeSelectCommand.execute(ButtonEvent.DOWN, 127);
}
Aggregations