Search in sources :

Example 1 with SLMkIIIControlSurface

use of de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface 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));
}
Also used : NoteMode(de.mossgrabers.controller.novation.slmkiii.mode.NoteMode) SLMkIIIPanMode(de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIIPanMode) SLMkIIIControlSurface(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface) ParametersMode(de.mossgrabers.controller.novation.slmkiii.mode.device.ParametersMode) OptionsMode(de.mossgrabers.controller.novation.slmkiii.mode.OptionsMode) SequencerResolutionMode(de.mossgrabers.controller.novation.slmkiii.mode.SequencerResolutionMode) BrowserMode(de.mossgrabers.controller.novation.slmkiii.mode.BrowserMode) SLMkIIITrackMode(de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIITrackMode) UserMode(de.mossgrabers.controller.novation.slmkiii.mode.device.UserMode) SLMkIIIVolumeMode(de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIIVolumeMode) ModeManager(de.mossgrabers.framework.featuregroup.ModeManager) SLMkIIISendMode(de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIISendMode)

Example 2 with SLMkIIIControlSurface

use of de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface in project DrivenByMoss by git-moss.

the class SLMkIIIControllerSetup method createSurface.

/**
 * {@inheritDoc}
 */
@Override
protected void createSurface() {
    final IMidiAccess midiAccess = this.factory.createMidiAccess();
    final IMidiOutput output = midiAccess.createOutput();
    final IMidiInput keyboardInput = midiAccess.createInput(1, "Keyboard", "8?????", "9?????", "B?????", "D?????", "E?????");
    final IHost hostProxy = this.model.getHost();
    final IMidiInput input = midiAccess.createInput("Pads", "8?????", "9?????");
    final SLMkIIILightGuide lightGuide = new SLMkIIILightGuide(this.model, this.colorManager, output);
    final SLMkIIIControlSurface surface = new SLMkIIIControlSurface(hostProxy, this.colorManager, this.configuration, output, input, lightGuide);
    this.surfaces.add(surface);
    surface.addPianoKeyboard(61, keyboardInput, true);
    keyboardInput.setMidiCallback((status, data1, data2) -> {
        final int code = status & 0xF0;
        if (code == 0x80 || code == 0x90)
            lightGuide.updateKeyboardNote(data1, data2);
    });
}
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) SLMkIIILightGuide(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIILightGuide) SLMkIIIControlSurface(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface)

Example 3 with SLMkIIIControlSurface

use of de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface in project DrivenByMoss by git-moss.

the class SLMkIIIControllerSetup method layoutControls.

/**
 * {@inheritDoc}
 */
@Override
protected void layoutControls() {
    final SLMkIIIControlSurface surface = this.getSurface();
    surface.getContinuous(ContinuousID.MODULATION_WHEEL).setBounds(74.5, 204.0, 26.5, 143.75);
    surface.getContinuous(ContinuousID.PITCHBEND_WHEEL).setBounds(32.25, 204.0, 26.5, 143.75);
    surface.getPianoKeyboard().setBounds(129.5, 201.0, 834.0, 157.0);
    surface.getTextDisplay().getHardwareDisplay().setBounds(266.25, 54.75, 280.5, 46.25);
    surface.getButton(ButtonID.PAD1).setBounds(267.5, 158.25, 24.25, 22.5);
    surface.getButton(ButtonID.PAD2).setBounds(297.0, 158.25, 24.25, 22.5);
    surface.getButton(ButtonID.PAD3).setBounds(326.5, 158.25, 24.25, 22.5);
    surface.getButton(ButtonID.PAD4).setBounds(356.0, 158.25, 24.25, 22.5);
    surface.getButton(ButtonID.PAD5).setBounds(385.5, 158.25, 24.25, 22.5);
    surface.getButton(ButtonID.PAD6).setBounds(415.0, 158.25, 24.25, 22.5);
    surface.getButton(ButtonID.PAD7).setBounds(444.5, 158.25, 24.25, 22.5);
    surface.getButton(ButtonID.PAD8).setBounds(474.0, 158.25, 24.25, 22.5);
    surface.getButton(ButtonID.PAD9).setBounds(267.75, 130.5, 24.25, 22.5);
    surface.getButton(ButtonID.PAD10).setBounds(297.25, 130.5, 24.25, 22.5);
    surface.getButton(ButtonID.PAD11).setBounds(326.75, 130.5, 24.25, 22.5);
    surface.getButton(ButtonID.PAD12).setBounds(356.25, 130.5, 24.25, 22.5);
    surface.getButton(ButtonID.PAD13).setBounds(385.75, 130.5, 24.25, 22.5);
    surface.getButton(ButtonID.PAD14).setBounds(415.0, 130.5, 24.25, 22.5);
    surface.getButton(ButtonID.PAD15).setBounds(444.5, 130.5, 24.25, 22.5);
    surface.getButton(ButtonID.PAD16).setBounds(474.0, 130.5, 24.25, 22.5);
    surface.getButton(ButtonID.REWIND).setBounds(815.5, 162.25, 21.0, 18.5);
    surface.getButton(ButtonID.FORWARD).setBounds(840.5, 162.25, 21.0, 18.5);
    surface.getButton(ButtonID.LOOP).setBounds(915.25, 162.25, 21.0, 18.5);
    surface.getButton(ButtonID.STOP).setBounds(865.25, 162.25, 21.0, 18.5);
    surface.getButton(ButtonID.PLAY).setBounds(890.25, 162.25, 21.0, 18.5);
    surface.getButton(ButtonID.RECORD).setBounds(940.25, 162.25, 21.0, 18.5);
    surface.getButton(ButtonID.ROW1_1).setBounds(268.5, 111.25, 23.75, 12.75);
    surface.getButton(ButtonID.ROW2_1).setBounds(568.0, 61.0, 22.0, 12.75);
    surface.getButton(ButtonID.ROW3_1).setBounds(568.0, 82.75, 22.0, 12.75);
    surface.getButton(ButtonID.ROW1_2).setBounds(297.75, 111.25, 23.75, 12.75);
    surface.getButton(ButtonID.ROW2_2).setBounds(598.0, 61.0, 22.0, 12.75);
    surface.getButton(ButtonID.ROW3_2).setBounds(598.0, 82.75, 22.0, 12.75);
    surface.getButton(ButtonID.ROW1_3).setBounds(327.0, 111.25, 23.75, 12.75);
    surface.getButton(ButtonID.ROW2_3).setBounds(628.0, 61.0, 22.0, 12.75);
    surface.getButton(ButtonID.ROW3_3).setBounds(628.0, 82.75, 22.0, 12.75);
    surface.getButton(ButtonID.ROW1_4).setBounds(356.25, 111.25, 23.75, 12.75);
    surface.getButton(ButtonID.ROW2_4).setBounds(658.0, 61.0, 22.0, 12.75);
    surface.getButton(ButtonID.ROW3_4).setBounds(658.0, 82.75, 22.0, 12.75);
    surface.getButton(ButtonID.ROW1_5).setBounds(385.5, 111.25, 23.75, 12.75);
    surface.getButton(ButtonID.ROW2_5).setBounds(688.0, 61.0, 22.0, 12.75);
    surface.getButton(ButtonID.ROW3_5).setBounds(688.0, 82.75, 22.0, 12.75);
    surface.getButton(ButtonID.ROW1_6).setBounds(414.75, 111.25, 23.75, 12.75);
    surface.getButton(ButtonID.ROW2_6).setBounds(718.0, 61.0, 22.0, 12.75);
    surface.getButton(ButtonID.ROW3_6).setBounds(718.0, 82.75, 22.0, 12.75);
    surface.getButton(ButtonID.ROW1_7).setBounds(444.25, 111.25, 23.75, 12.75);
    surface.getButton(ButtonID.ROW2_7).setBounds(748.0, 61.0, 22.0, 12.75);
    surface.getButton(ButtonID.ROW3_7).setBounds(748.0, 82.75, 22.0, 12.75);
    surface.getButton(ButtonID.ROW1_8).setBounds(473.5, 111.25, 23.75, 12.75);
    surface.getButton(ButtonID.ROW2_8).setBounds(778.0, 61.0, 22.0, 12.75);
    surface.getButton(ButtonID.ROW3_8).setBounds(778.0, 82.75, 22.0, 12.75);
    surface.getButton(ButtonID.ARROW_UP).setBounds(233.0, 62.25, 28.5, 12.75);
    surface.getButton(ButtonID.ARROW_DOWN).setBounds(233.0, 82.75, 28.5, 12.75);
    surface.getButton(ButtonID.SHIFT).setBounds(32.25, 63.0, 27.25, 13.75);
    surface.getButton(ButtonID.USER).setBounds(508.25, 111.25, 24.25, 12.75);
    surface.getButton(ButtonID.OCTAVE_UP).setBounds(811.25, 61.0, 27.25, 13.75);
    surface.getButton(ButtonID.OCTAVE_DOWN).setBounds(811.25, 82.75, 27.25, 13.75);
    surface.getButton(ButtonID.ARROW_LEFT).setBounds(32.25, 164.0, 27.25, 13.75);
    surface.getButton(ButtonID.ARROW_RIGHT).setBounds(74.5, 164.0, 27.25, 13.75);
    surface.getButton(ButtonID.SCENE1).setBounds(508.25, 130.5, 24.25, 22.5);
    surface.getButton(ButtonID.SCENE2).setBounds(508.25, 158.25, 24.25, 22.5);
    surface.getButton(ButtonID.SCENE7).setBounds(233.0, 129.5, 29.25, 22.5);
    surface.getButton(ButtonID.SCENE8).setBounds(233.0, 158.25, 29.25, 22.5);
    surface.getButton(ButtonID.SESSION).setBounds(233.0, 111.25, 29.5, 12.75);
    surface.getButton(ButtonID.DUPLICATE).setBounds(32.25, 126.75, 27.25, 13.75);
    surface.getButton(ButtonID.DELETE).setBounds(32.25, 144.5, 27.25, 13.75);
    surface.getContinuous(ContinuousID.KNOB1).setBounds(267.25, 10.25, 24.5, 23.75);
    surface.getContinuous(ContinuousID.FADER1).setBounds(568.0, 126.75, 21.25, 54.0);
    surface.getContinuous(ContinuousID.KNOB2).setBounds(296.75, 10.25, 24.5, 23.75);
    surface.getContinuous(ContinuousID.FADER2).setBounds(598.0, 126.75, 21.25, 54.0);
    surface.getContinuous(ContinuousID.KNOB3).setBounds(326.5, 10.25, 24.5, 23.75);
    surface.getContinuous(ContinuousID.FADER3).setBounds(628.0, 126.75, 21.25, 54.0);
    surface.getContinuous(ContinuousID.KNOB4).setBounds(356.0, 10.25, 24.5, 23.75);
    surface.getContinuous(ContinuousID.FADER4).setBounds(658.0, 126.75, 21.25, 54.0);
    surface.getContinuous(ContinuousID.KNOB5).setBounds(385.5, 10.25, 24.5, 23.75);
    surface.getContinuous(ContinuousID.FADER5).setBounds(688.0, 126.75, 21.25, 54.0);
    surface.getContinuous(ContinuousID.KNOB6).setBounds(415.25, 10.25, 24.5, 23.75);
    surface.getContinuous(ContinuousID.FADER6).setBounds(718.0, 126.75, 21.25, 54.0);
    surface.getContinuous(ContinuousID.KNOB7).setBounds(444.75, 10.25, 24.5, 23.75);
    surface.getContinuous(ContinuousID.FADER7).setBounds(748.0, 126.75, 21.25, 54.0);
    surface.getContinuous(ContinuousID.KNOB8).setBounds(474.25, 10.25, 24.5, 23.75);
    surface.getContinuous(ContinuousID.FADER8).setBounds(778.0, 126.75, 21.25, 54.0);
    surface.getLight(OutputID.LED1).setBounds(568.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED1).setBounds(568.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED2).setBounds(598.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED2).setBounds(598.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED3).setBounds(628.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED3).setBounds(628.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED4).setBounds(658.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED4).setBounds(658.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED5).setBounds(688.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED5).setBounds(688.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED6).setBounds(718.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED6).setBounds(718.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED7).setBounds(748.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED7).setBounds(748.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED8).setBounds(778.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED8).setBounds(778.0, 109.5, 21.25, 10.0);
    surface.getLight(OutputID.LED_RING1).setBounds(269.0, 35.75, 22.25, 9.25);
    surface.getLight(OutputID.LED_RING2).setBounds(298.5, 35.75, 22.25, 9.25);
    surface.getLight(OutputID.LED_RING3).setBounds(328.25, 35.75, 22.25, 9.25);
    surface.getLight(OutputID.LED_RING4).setBounds(357.75, 35.75, 22.25, 9.25);
    surface.getLight(OutputID.LED_RING5).setBounds(387.25, 35.75, 22.25, 9.25);
    surface.getLight(OutputID.LED_RING6).setBounds(416.75, 35.75, 22.25, 9.25);
    surface.getLight(OutputID.LED_RING7).setBounds(446.5, 35.75, 22.25, 9.25);
    surface.getLight(OutputID.LED_RING8).setBounds(476.0, 35.75, 22.25, 9.25);
    surface.getLight(OutputID.LIGHT_GUIDE1).setBounds(135.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE2).setBounds(148.25, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE3).setBounds(160.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE4).setBounds(173.25, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE5).setBounds(185.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE6).setBounds(204.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE7).setBounds(216.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE8).setBounds(229.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE9).setBounds(241.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE10).setBounds(254.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE11).setBounds(266.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE12).setBounds(279.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE13).setBounds(295.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE14).setBounds(309.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE15).setBounds(322.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE16).setBounds(335.25, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE17).setBounds(348.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE18).setBounds(365.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE19).setBounds(378.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE20).setBounds(390.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE21).setBounds(402.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE22).setBounds(415.25, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE23).setBounds(427.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE24).setBounds(440.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE25).setBounds(457.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE26).setBounds(470.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE27).setBounds(483.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE28).setBounds(497.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE29).setBounds(510.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE30).setBounds(526.25, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE31).setBounds(539.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE32).setBounds(551.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE33).setBounds(564.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE34).setBounds(577.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE35).setBounds(589.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE36).setBounds(602.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE37).setBounds(621.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE38).setBounds(634.25, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE39).setBounds(647.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE40).setBounds(659.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE41).setBounds(672.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE42).setBounds(691.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE43).setBounds(703.25, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE44).setBounds(715.25, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE45).setBounds(727.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE46).setBounds(739.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE47).setBounds(752.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE48).setBounds(764.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE49).setBounds(782.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE50).setBounds(795.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE51).setBounds(809.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE52).setBounds(822.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE53).setBounds(835.25, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE54).setBounds(851.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE55).setBounds(863.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE56).setBounds(876.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE57).setBounds(889.0, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE58).setBounds(901.75, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE59).setBounds(914.5, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE60).setBounds(927.25, 187.5, 10.0, 10.0);
    surface.getLight(OutputID.LIGHT_GUIDE61).setBounds(944.75, 187.5, 10.0, 10.0);
}
Also used : SLMkIIIControlSurface(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface)

Example 4 with SLMkIIIControlSurface

use of de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface in project DrivenByMoss by git-moss.

the class SLMkIIIControllerSetup method createViews.

/**
 * {@inheritDoc}
 */
@Override
protected void createViews() {
    final SLMkIIIControlSurface surface = this.getSurface();
    final ViewManager viewManager = surface.getViewManager();
    viewManager.register(Views.SESSION, new SessionView(surface, this.model));
    viewManager.register(Views.DRUM, new DrumView(surface, this.model));
    viewManager.register(Views.COLOR, new ColorView<>(surface, this.model));
}
Also used : ViewManager(de.mossgrabers.framework.featuregroup.ViewManager) SessionView(de.mossgrabers.controller.novation.slmkiii.view.SessionView) SLMkIIIControlSurface(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface) DrumView(de.mossgrabers.controller.novation.slmkiii.view.DrumView)

Example 5 with SLMkIIIControlSurface

use of de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface in project DrivenByMoss by git-moss.

the class SLMkIIIControllerSetup method registerContinuousCommands.

/**
 * {@inheritDoc}
 */
@Override
protected void registerContinuousCommands() {
    final SLMkIIIControlSurface surface = this.getSurface();
    for (int i = 0; i < 8; i++) {
        this.addRelativeKnob(ContinuousID.get(ContinuousID.KNOB1, i), "Knob " + (i + 1), new KnobRowModeCommand<>(i, this.model, surface), BindType.CC, 15, SLMkIIIControlSurface.MKIII_KNOB_1 + i).setIndexInGroup(i);
        this.addFader(ContinuousID.get(ContinuousID.FADER1, i), "Fader " + (i + 1), null, BindType.CC, 15, SLMkIIIControlSurface.MKIII_FADER_1 + i).setIndexInGroup(i);
    }
    // Volume faders which can be turned off in the settings...
    final TrackVolumeMode<SLMkIIIControlSurface, SLMkIIIConfiguration> volumeMode = new TrackVolumeMode<>(surface, this.model, true, ContinuousID.createSequentialList(ContinuousID.FADER1, 8));
    volumeMode.onActivate();
    this.configuration.addSettingObserver(SLMkIIIConfiguration.ENABLE_FADERS, () -> {
        if (this.configuration.areFadersEnabled())
            volumeMode.onActivate();
        else
            volumeMode.onDeactivate();
    });
}
Also used : SLMkIIIControlSurface(de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface) KnobRowModeCommand(de.mossgrabers.framework.command.continuous.KnobRowModeCommand) TrackVolumeMode(de.mossgrabers.framework.mode.track.TrackVolumeMode)

Aggregations

SLMkIIIControlSurface (de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIControlSurface)7 ModeManager (de.mossgrabers.framework.featuregroup.ModeManager)3 DrumView (de.mossgrabers.controller.novation.slmkiii.view.DrumView)2 ViewManager (de.mossgrabers.framework.featuregroup.ViewManager)2 ButtonAreaCommand (de.mossgrabers.controller.novation.slmkiii.command.trigger.ButtonAreaCommand)1 DeviceModeCommand (de.mossgrabers.controller.novation.slmkiii.command.trigger.DeviceModeCommand)1 SLMkIIIPlayCommand (de.mossgrabers.controller.novation.slmkiii.command.trigger.SLMkIIIPlayCommand)1 SLMkIIIToggleLoopCommand (de.mossgrabers.controller.novation.slmkiii.command.trigger.SLMkIIIToggleLoopCommand)1 TrackModeCommand (de.mossgrabers.controller.novation.slmkiii.command.trigger.TrackModeCommand)1 SLMkIIIDisplay (de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIDisplay)1 SLMkIIILightGuide (de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIILightGuide)1 BaseMode (de.mossgrabers.controller.novation.slmkiii.mode.BaseMode)1 BrowserMode (de.mossgrabers.controller.novation.slmkiii.mode.BrowserMode)1 NoteMode (de.mossgrabers.controller.novation.slmkiii.mode.NoteMode)1 OptionsMode (de.mossgrabers.controller.novation.slmkiii.mode.OptionsMode)1 SequencerResolutionMode (de.mossgrabers.controller.novation.slmkiii.mode.SequencerResolutionMode)1 ParametersMode (de.mossgrabers.controller.novation.slmkiii.mode.device.ParametersMode)1 UserMode (de.mossgrabers.controller.novation.slmkiii.mode.device.UserMode)1 SLMkIIIPanMode (de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIIPanMode)1 SLMkIIISendMode (de.mossgrabers.controller.novation.slmkiii.mode.track.SLMkIIISendMode)1