use of de.mossgrabers.sl.controller.SLControlSurface in project DrivenByMoss by git-moss.
the class SLControllerSetup method createSurface.
/**
* {@inheritDoc}
*/
@Override
protected void createSurface() {
final IMidiAccess midiAccess = this.factory.createMidiAccess();
final IMidiOutput output = midiAccess.createOutput();
final IMidiInput input = midiAccess.createInput(this.isMkII ? "Novation SL MkII (Drumpads)" : "Novation SL MkI (Drumpads)", "90????", "80????");
midiAccess.createInput(1, this.isMkII ? "Novation SL MkII (Keyboard)" : "Novation SL MkI (Keyboard)", "80????", "90????", "B0????", "D0????", "E0????");
final IHost hostProxy = this.model.getHost();
final SLControlSurface surface = new SLControlSurface(hostProxy, this.colorManager, this.configuration, output, input, this.isMkII);
surface.setDisplay(new SLDisplay(hostProxy, output));
this.surfaces.add(surface);
}
use of de.mossgrabers.sl.controller.SLControlSurface in project DrivenByMoss by git-moss.
the class SLControllerSetup method createViews.
/**
* {@inheritDoc}
*/
@Override
protected void createViews() {
final SLControlSurface surface = this.getSurface();
final ViewManager viewManager = surface.getViewManager();
viewManager.registerView(Views.VIEW_PLAY, new PlayView(surface, this.model));
viewManager.registerView(Views.VIEW_CONTROL, new ControlView(surface, this.model));
}
use of de.mossgrabers.sl.controller.SLControlSurface in project DrivenByMoss by git-moss.
the class SLControllerSetup method registerTriggerCommands.
/**
* {@inheritDoc}
*/
@Override
protected void registerTriggerCommands() {
final SLControlSurface surface = this.getSurface();
for (int i = 0; i < 8; i++) {
this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW1_1.intValue() + i), SLControlSurface.MKII_BUTTON_ROW1_1 + i, new ButtonRowViewCommand<>(0, i, this.model, surface));
this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW2_1.intValue() + i), SLControlSurface.MKII_BUTTON_ROW2_1 + i, new ButtonRowViewCommand<>(1, i, this.model, surface));
this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW3_1.intValue() + i), SLControlSurface.MKII_BUTTON_ROW3_1 + i, new ButtonRowViewCommand<>(2, i, this.model, surface));
this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW4_1.intValue() + i), SLControlSurface.MKII_BUTTON_ROW4_1 + i, new ButtonRowViewCommand<>(3, i, this.model, surface));
this.addTriggerCommand(Integer.valueOf(Commands.COMMAND_ROW_SELECT_1.intValue() + i), SLControlSurface.MKII_BUTTON_ROWSEL1 + i, new ButtonRowSelectCommand<>(i, this.model, surface));
}
this.addTriggerCommand(Commands.COMMAND_REWIND, SLControlSurface.MKII_BUTTON_REWIND, new ButtonRowViewCommand<>(4, 0, this.model, surface));
this.addTriggerCommand(Commands.COMMAND_FORWARD, SLControlSurface.MKII_BUTTON_FORWARD, new ButtonRowViewCommand<>(4, 1, this.model, surface));
this.addTriggerCommand(Commands.COMMAND_STOP, SLControlSurface.MKII_BUTTON_STOP, new ButtonRowViewCommand<>(4, 2, this.model, surface));
this.addTriggerCommand(Commands.COMMAND_PLAY, SLControlSurface.MKII_BUTTON_PLAY, new ButtonRowViewCommand<>(4, 3, this.model, surface));
this.addTriggerCommand(Commands.COMMAND_LOOP, SLControlSurface.MKII_BUTTON_LOOP, new ButtonRowViewCommand<>(4, 4, this.model, surface));
this.addTriggerCommand(Commands.COMMAND_RECORD, SLControlSurface.MKII_BUTTON_RECORD, new ButtonRowViewCommand<>(4, 6, this.model, surface));
this.addTriggerCommand(Commands.COMMAND_ARROW_LEFT, SLControlSurface.MKII_BUTTON_P1_UP, new P1ButtonCommand(true, this.model, surface));
this.addTriggerCommand(Commands.COMMAND_ARROW_RIGHT, SLControlSurface.MKII_BUTTON_P1_DOWN, new P1ButtonCommand(false, this.model, surface));
this.addTriggerCommand(Commands.COMMAND_ARROW_UP, SLControlSurface.MKII_BUTTON_P2_UP, new P2ButtonCommand(true, this.model, surface));
this.addTriggerCommand(Commands.COMMAND_ARROW_DOWN, SLControlSurface.MKII_BUTTON_P2_DOWN, new P2ButtonCommand(false, this.model, surface));
this.addTriggerCommand(Commands.COMMAND_SELECT_PLAY_VIEW, SLControlSurface.MKII_BUTTON_TRANSPORT, new TransportButtonCommand(this.model, surface));
}
use of de.mossgrabers.sl.controller.SLControlSurface in project DrivenByMoss by git-moss.
the class SLControllerSetup method registerContinuousCommands.
/**
* {@inheritDoc}
*/
@Override
protected void registerContinuousCommands() {
final SLControlSurface surface = this.getSurface();
for (int i = 0; i < 8; i++) {
this.addContinuousCommand(Integer.valueOf(Commands.CONT_COMMAND_FADER1.intValue() + i), SLControlSurface.MKII_SLIDER1 + i, new FaderCommand(i, this.model, surface));
this.addContinuousCommand(Integer.valueOf(Commands.CONT_COMMAND_DEVICE_KNOB1.intValue() + i), SLControlSurface.MKII_KNOB_ROW1_1 + i, new DeviceKnobRowCommand(i, this.model, surface));
this.addContinuousCommand(Integer.valueOf(Commands.CONT_COMMAND_KNOB1.intValue() + i), SLControlSurface.MKII_KNOB_ROW2_1 + i, new TrackKnobRowCommand(i, this.model, surface));
}
this.addContinuousCommand(Commands.CONT_COMMAND_TOUCHPAD_X, SLControlSurface.MKII_TOUCHPAD_X, new TouchpadCommand(true, this.model, surface));
this.addContinuousCommand(Commands.CONT_COMMAND_TOUCHPAD_Y, SLControlSurface.MKII_TOUCHPAD_Y, new TouchpadCommand(false, this.model, surface));
this.addContinuousCommand(Commands.CONT_COMMAND_TEMPO_TOUCH, SLControlSurface.MKI_BUTTON_TAP_TEMPO, new TapTempoInitMkICommand(this.model, surface));
this.addContinuousCommand(Commands.CONT_COMMAND_TEMPO, SLControlSurface.MKI_BUTTON_TAP_TEMPO_VALUE, new TapTempoMkICommand(this.model, surface));
}
use of de.mossgrabers.sl.controller.SLControlSurface 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.registerMode(Modes.MODE_FIXED, new FixedMode(surface, this.model));
modeManager.registerMode(Modes.MODE_FRAME, new FrameMode(surface, this.model));
modeManager.registerMode(Modes.MODE_FUNCTIONS, new FunctionMode(surface, this.model));
modeManager.registerMode(Modes.MODE_MASTER, new MasterMode(surface, this.model));
modeManager.registerMode(Modes.MODE_PLAY_OPTIONS, new PlayOptionsMode(surface, this.model));
modeManager.registerMode(Modes.MODE_SESSION, new SessionMode(surface, this.model));
modeManager.registerMode(Modes.MODE_TRACK, new TrackMode(surface, this.model));
modeManager.registerMode(Modes.MODE_TRACK_TOGGLES, new TrackTogglesMode(surface, this.model));
modeManager.registerMode(Modes.MODE_VIEW_SELECT, new ViewSelectMode(surface, this.model));
modeManager.registerMode(Modes.MODE_VOLUME, new VolumeMode(surface, this.model));
modeManager.registerMode(Modes.MODE_PARAMS, new DeviceParamsMode(surface, this.model));
modeManager.registerMode(Modes.MODE_BROWSER, new DevicePresetsMode(surface, this.model));
}
Aggregations