Search in sources :

Example 1 with SLControlSurface

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);
}
Also used : IMidiAccess(de.mossgrabers.framework.daw.midi.IMidiAccess) IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) IMidiInput(de.mossgrabers.framework.daw.midi.IMidiInput) IHost(de.mossgrabers.framework.daw.IHost) SLControlSurface(de.mossgrabers.sl.controller.SLControlSurface) SLDisplay(de.mossgrabers.sl.controller.SLDisplay)

Example 2 with SLControlSurface

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));
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) SLControlSurface(de.mossgrabers.sl.controller.SLControlSurface) PlayView(de.mossgrabers.sl.view.PlayView) ControlView(de.mossgrabers.sl.view.ControlView)

Example 3 with SLControlSurface

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));
}
Also used : TransportButtonCommand(de.mossgrabers.sl.command.trigger.TransportButtonCommand) P1ButtonCommand(de.mossgrabers.sl.command.trigger.P1ButtonCommand) P2ButtonCommand(de.mossgrabers.sl.command.trigger.P2ButtonCommand) SLControlSurface(de.mossgrabers.sl.controller.SLControlSurface)

Example 4 with SLControlSurface

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));
}
Also used : TrackKnobRowCommand(de.mossgrabers.sl.command.continuous.TrackKnobRowCommand) TapTempoMkICommand(de.mossgrabers.sl.command.continuous.TapTempoMkICommand) TapTempoInitMkICommand(de.mossgrabers.sl.command.continuous.TapTempoInitMkICommand) FaderCommand(de.mossgrabers.sl.command.continuous.FaderCommand) SLControlSurface(de.mossgrabers.sl.controller.SLControlSurface) DeviceKnobRowCommand(de.mossgrabers.sl.command.continuous.DeviceKnobRowCommand) TouchpadCommand(de.mossgrabers.sl.command.continuous.TouchpadCommand)

Example 5 with SLControlSurface

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));
}
Also used : TrackMode(de.mossgrabers.sl.mode.TrackMode) MasterMode(de.mossgrabers.sl.mode.MasterMode) TrackTogglesMode(de.mossgrabers.sl.mode.TrackTogglesMode) FunctionMode(de.mossgrabers.sl.mode.FunctionMode) SLControlSurface(de.mossgrabers.sl.controller.SLControlSurface) FixedMode(de.mossgrabers.sl.mode.FixedMode) DeviceParamsMode(de.mossgrabers.sl.mode.device.DeviceParamsMode) SessionMode(de.mossgrabers.sl.mode.SessionMode) VolumeMode(de.mossgrabers.sl.mode.VolumeMode) DevicePresetsMode(de.mossgrabers.sl.mode.device.DevicePresetsMode) ViewSelectMode(de.mossgrabers.sl.mode.ViewSelectMode) FrameMode(de.mossgrabers.sl.mode.FrameMode) PlayOptionsMode(de.mossgrabers.sl.mode.PlayOptionsMode) ModeManager(de.mossgrabers.framework.mode.ModeManager)

Aggregations

SLControlSurface (de.mossgrabers.sl.controller.SLControlSurface)7 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)1 ICursorDevice (de.mossgrabers.framework.daw.ICursorDevice)1 IHost (de.mossgrabers.framework.daw.IHost)1 ITrackBank (de.mossgrabers.framework.daw.ITrackBank)1 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)1 ITrack (de.mossgrabers.framework.daw.data.ITrack)1 IMidiAccess (de.mossgrabers.framework.daw.midi.IMidiAccess)1 IMidiInput (de.mossgrabers.framework.daw.midi.IMidiInput)1 IMidiOutput (de.mossgrabers.framework.daw.midi.IMidiOutput)1 ModeManager (de.mossgrabers.framework.mode.ModeManager)1 ViewManager (de.mossgrabers.framework.view.ViewManager)1 DeviceKnobRowCommand (de.mossgrabers.sl.command.continuous.DeviceKnobRowCommand)1 FaderCommand (de.mossgrabers.sl.command.continuous.FaderCommand)1 TapTempoInitMkICommand (de.mossgrabers.sl.command.continuous.TapTempoInitMkICommand)1 TapTempoMkICommand (de.mossgrabers.sl.command.continuous.TapTempoMkICommand)1 TouchpadCommand (de.mossgrabers.sl.command.continuous.TouchpadCommand)1 TrackKnobRowCommand (de.mossgrabers.sl.command.continuous.TrackKnobRowCommand)1 P1ButtonCommand (de.mossgrabers.sl.command.trigger.P1ButtonCommand)1 P2ButtonCommand (de.mossgrabers.sl.command.trigger.P2ButtonCommand)1