use of de.mossgrabers.controller.ni.maschine.mk3.controller.MaschineControlSurface in project DrivenByMoss by git-moss.
the class MaschineControllerSetup method layoutStudio.
private void layoutStudio() {
final MaschineControlSurface surface = this.getSurface();
surface.getButton(ButtonID.PAD1).setBounds(425.5, 590.0, 76.25, 79.0);
surface.getButton(ButtonID.PAD2).setBounds(516.25, 590.75, 76.25, 79.0);
surface.getButton(ButtonID.PAD3).setBounds(606.75, 590.75, 76.25, 79.0);
surface.getButton(ButtonID.PAD4).setBounds(694.75, 590.75, 75.75, 79.0);
surface.getButton(ButtonID.PAD5).setBounds(425.5, 500.5, 76.25, 79.0);
surface.getButton(ButtonID.PAD6).setBounds(516.25, 501.0, 76.25, 79.0);
surface.getButton(ButtonID.PAD7).setBounds(606.75, 501.25, 76.25, 79.0);
surface.getButton(ButtonID.PAD8).setBounds(694.75, 501.0, 76.25, 79.0);
surface.getButton(ButtonID.PAD9).setBounds(425.5, 410.75, 76.25, 79.0);
surface.getButton(ButtonID.PAD10).setBounds(516.25, 411.5, 76.25, 79.0);
surface.getButton(ButtonID.PAD11).setBounds(606.75, 411.75, 76.25, 79.0);
surface.getButton(ButtonID.PAD12).setBounds(694.75, 411.0, 76.25, 79.0);
surface.getButton(ButtonID.PAD13).setBounds(425.5, 321.25, 76.25, 79.0);
surface.getButton(ButtonID.PAD14).setBounds(516.25, 321.75, 76.25, 79.0);
surface.getButton(ButtonID.PAD15).setBounds(606.75, 322.25, 76.25, 79.0);
surface.getButton(ButtonID.PAD16).setBounds(694.75, 321.25, 76.25, 79.0);
surface.getButton(ButtonID.SHIFT).setBounds(837.25, 637.75, 56.25, 32.0);
surface.getButton(ButtonID.PLAY).setBounds(24.0, 636.25, 56.75, 32.0);
surface.getButton(ButtonID.RECORD).setBounds(96.0, 636.25, 56.75, 32.0);
surface.getButton(ButtonID.LOOP).setBounds(24.75, 604.5, 56.0, 18.0);
surface.getButton(ButtonID.DELETE).setBounds(165.5, 636.25, 56.75, 32.0);
surface.getButton(ButtonID.TAP_TEMPO).setBounds(27.75, 318.0, 56.25, 37.0);
surface.getButton(ButtonID.FLIP).setBounds(236.5, 604.5, 56.0, 18.0);
surface.getButton(ButtonID.NEW).setBounds(168.5, 318.0, 56.25, 37.5);
surface.getButton(ButtonID.AUTOMATION).setBounds(94.75, 236.75, 55.75, 32.0);
surface.getButton(ButtonID.OVERDUB).setBounds(1052.0, 637.75, 56.25, 32.0);
surface.getButton(ButtonID.REPEAT).setBounds(239.0, 318.0, 56.25, 37.0);
surface.getButton(ButtonID.FADER_TOUCH_1).setBounds(1037.0, 426.5, 69.5, 22.75);
surface.getButton(ButtonID.DEVICE).setBounds(94.75, 21.25, 55.75, 23.0);
surface.getButton(ButtonID.DEVICE_ON_OFF).setBounds(94.75, 107.25, 55.75, 38.5);
surface.getButton(ButtonID.ADD_TRACK).setBounds(27.75, 236.75, 55.75, 32.0);
surface.getButton(ButtonID.BROWSE).setBounds(27.75, 107.25, 55.75, 38.5);
surface.getButton(ButtonID.SCENE1).setBounds(347.25, 321.0, 58.0, 34.0);
surface.getButton(ButtonID.CLIP).setBounds(347.25, 365.75, 58.0, 34.0);
surface.getButton(ButtonID.NOTE).setBounds(165.5, 604.5, 56.0, 18.0);
surface.getButton(ButtonID.TOGGLE_DEVICE).setBounds(347.25, 455.0, 58.0, 34.0);
surface.getButton(ButtonID.DUPLICATE).setBounds(347.25, 499.5, 58.0, 34.0);
surface.getButton(ButtonID.SELECT).setBounds(347.25, 544.25, 58.0, 34.0);
surface.getButton(ButtonID.SOLO).setBounds(347.25, 588.75, 58.0, 34.0);
surface.getButton(ButtonID.MUTE).setBounds(347.25, 633.5, 58.0, 34.0);
surface.getButton(ButtonID.ROW1_1).setBounds(347.25, 410.25, 58.0, 34.0);
surface.getButton(ButtonID.ROW1_4).setBounds(98.25, 318.0, 56.25, 37.0);
surface.getButton(ButtonID.ARROW_LEFT).setBounds(908.75, 637.75, 56.25, 32.0);
surface.getButton(ButtonID.ARROW_RIGHT).setBounds(980.5, 637.75, 56.25, 32.0);
surface.getButton(ButtonID.PAGE_LEFT).setBounds(27.75, 157.75, 55.75, 23.0);
surface.getButton(ButtonID.PAGE_RIGHT).setBounds(94.75, 157.75, 55.75, 23.0);
surface.getButton(ButtonID.LAYOUT_ARRANGE).setBounds(27.75, 56.5, 55.75, 38.5);
surface.getButton(ButtonID.MIXER).setBounds(94.75, 56.5, 55.75, 38.5);
surface.getButton(ButtonID.DRUM).setBounds(27.75, 21.25, 55.75, 23.0);
surface.getButton(ButtonID.ROW2_1).setBounds(179.25, 21.25, 66.25, 27.25);
surface.getButton(ButtonID.ROW2_2).setBounds(254.25, 21.25, 66.25, 27.25);
surface.getButton(ButtonID.ROW2_3).setBounds(329.25, 21.25, 66.25, 27.25);
surface.getButton(ButtonID.ROW2_4).setBounds(404.0, 21.25, 66.25, 27.25);
surface.getButton(ButtonID.ROW2_5).setBounds(479.0, 21.25, 66.25, 27.25);
surface.getButton(ButtonID.ROW2_6).setBounds(554.0, 21.25, 66.25, 27.25);
surface.getButton(ButtonID.ROW2_7).setBounds(629.0, 21.25, 66.25, 27.25);
surface.getButton(ButtonID.ROW2_8).setBounds(704.0, 21.25, 66.25, 27.25);
surface.getButton(ButtonID.ROW3_1).setBounds(28.5, 438.75, 53.75, 35.0);
surface.getButton(ButtonID.ROW3_2).setBounds(98.25, 438.75, 53.75, 35.0);
surface.getButton(ButtonID.ROW3_3).setBounds(167.75, 438.75, 53.75, 35.0);
surface.getButton(ButtonID.ROW3_4).setBounds(239.75, 438.75, 53.75, 35.0);
surface.getButton(ButtonID.ROW3_5).setBounds(28.5, 484.75, 53.75, 35.0);
surface.getButton(ButtonID.ROW3_6).setBounds(98.25, 484.75, 53.75, 35.0);
surface.getButton(ButtonID.ROW3_7).setBounds(167.75, 484.75, 53.75, 35.0);
surface.getButton(ButtonID.ROW3_8).setBounds(239.75, 484.75, 53.75, 35.0);
surface.getButton(ButtonID.METRONOME).setBounds(96.0, 604.5, 56.0, 18.0);
surface.getButton(ButtonID.UNDO).setBounds(837.25, 366.25, 56.25, 32.0);
surface.getButton(ButtonID.REDO).setBounds(908.75, 366.25, 56.25, 32.0);
surface.getButton(ButtonID.QUANTIZE).setBounds(980.5, 366.25, 56.25, 32.0);
surface.getButton(ButtonID.CONTROL).setBounds(1052.0, 366.25, 56.25, 32.0);
surface.getButton(ButtonID.COPY).setBounds(837.25, 323.0, 56.25, 32.0);
surface.getButton(ButtonID.PASTE).setBounds(908.75, 323.0, 56.25, 32.0);
surface.getButton(ButtonID.NUDGE_MINUS).setBounds(980.5, 323.0, 56.25, 32.0);
surface.getButton(ButtonID.NUDGE_PLUS).setBounds(1052.0, 323.0, 56.25, 32.0);
surface.getButton(ButtonID.ROW4_1).setBounds(1033.75, 44.5, 27.5, 22.75);
surface.getButton(ButtonID.ROW4_2).setBounds(1033.75, 89.5, 27.5, 22.75);
surface.getButton(ButtonID.ROW4_3).setBounds(1033.75, 134.25, 27.5, 22.75);
surface.getButton(ButtonID.ROW4_4).setBounds(1033.75, 179.25, 27.5, 22.75);
surface.getButton(ButtonID.ROW4_5).setBounds(930.75, 44.5, 27.5, 22.75);
surface.getButton(ButtonID.ROW4_6).setBounds(930.75, 89.5, 27.5, 22.75);
surface.getButton(ButtonID.ROW4_8).setBounds(930.75, 179.25, 27.5, 22.75);
surface.getButton(ButtonID.TOGGLE_VU).setBounds(930.75, 134.25, 27.5, 22.75);
surface.getContinuous(ContinuousID.MASTER_KNOB).setBounds(905.0, 427.0, 143.5, 138.5);
surface.getContinuous(ContinuousID.KNOB1).setBounds(183.5, 226.25, 53.75, 49.25);
surface.getContinuous(ContinuousID.KNOB2).setBounds(259.0, 226.25, 53.75, 49.25);
surface.getContinuous(ContinuousID.KNOB3).setBounds(334.75, 226.25, 53.75, 49.25);
surface.getContinuous(ContinuousID.KNOB4).setBounds(410.25, 226.25, 53.75, 49.25);
surface.getContinuous(ContinuousID.KNOB5).setBounds(486.0, 226.25, 53.75, 49.25);
surface.getContinuous(ContinuousID.KNOB6).setBounds(561.5, 226.25, 53.75, 49.25);
surface.getContinuous(ContinuousID.KNOB7).setBounds(637.0, 226.25, 53.75, 49.25);
surface.getContinuous(ContinuousID.KNOB8).setBounds(712.75, 226.25, 53.75, 49.25);
surface.getContinuous(ContinuousID.MONITOR_KNOB).setBounds(962.0, 217.0, 70.75, 69.0);
surface.getTextDisplay().getHardwareDisplay().setBounds(182.75, 111.75, 591.75, 64.5);
}
use of de.mossgrabers.controller.ni.maschine.mk3.controller.MaschineControlSurface in project DrivenByMoss by git-moss.
the class MaschineControllerSetup method registerDisplayButtons.
private void registerDisplayButtons(final MaschineControlSurface surface, final ModeManager modeManager) {
if (!this.maschine.hasMCUDisplay())
return;
this.addButton(ButtonID.ROW2_1, "Volume", new ModeSelectCommand<>(this.model, surface, Modes.VOLUME), MaschineControlSurface.MODE_BUTTON_1, () -> modeManager.isActive(Modes.VOLUME));
this.addButton(ButtonID.ROW2_2, "Pan", new ModeSelectCommand<>(this.model, surface, Modes.PAN), MaschineControlSurface.MODE_BUTTON_2, () -> modeManager.isActive(Modes.PAN));
final MaschineSendSelectCommand sendSelectCommand = new MaschineSendSelectCommand(this.model, surface);
this.addButton(ButtonID.ROW2_3, "Send -", (event, velocity) -> sendSelectCommand.executeShifted(event), MaschineControlSurface.MODE_BUTTON_3, () -> Modes.isSendMode(modeManager.getActiveID()));
this.addButton(ButtonID.ROW2_4, "Send +", sendSelectCommand, MaschineControlSurface.MODE_BUTTON_4, () -> Modes.isSendMode(modeManager.getActiveID()));
this.addButton(ButtonID.ROW2_5, "Pin", (event, velocity) -> {
if (event != ButtonEvent.DOWN)
return;
if (modeManager.isActive(Modes.DEVICE_PARAMS))
this.model.getCursorDevice().togglePinned();
else
this.model.getCursorTrack().togglePinned();
}, MaschineControlSurface.MODE_BUTTON_5, () -> {
if (modeManager.isActive(Modes.DEVICE_PARAMS))
return this.model.getCursorDevice().isPinned();
return this.model.getCursorTrack().isPinned();
});
this.addButton(ButtonID.ROW2_6, "Active", (event, velocity) -> {
if (event != ButtonEvent.DOWN)
return;
if (modeManager.isActive(Modes.DEVICE_PARAMS))
this.model.getCursorDevice().toggleEnabledState();
else
this.model.getCursorTrack().toggleIsActivated();
}, MaschineControlSurface.MODE_BUTTON_6, () -> {
if (modeManager.isActive(Modes.DEVICE_PARAMS))
return this.model.getCursorDevice().isEnabled();
final ITrack selectedTrack = this.model.getCursorTrack();
return selectedTrack.doesExist() && selectedTrack.isActivated();
});
// This button is mapped as Note not CC since it requires at least 1 MCU button to make
// the MCU display activate!
this.addButton(ButtonID.ROW2_7, "User Params", new ModeSelectCommand<>(this.model, surface, Modes.USER), MaschineControlSurface.MODE_BUTTON_7, () -> modeManager.isActive(Modes.USER));
this.addButton(ButtonID.ROW2_8, "Parameters", new ModeSelectCommand<>(this.model, surface, Modes.DEVICE_PARAMS), MaschineControlSurface.MODE_BUTTON_8, () -> modeManager.isActive(Modes.DEVICE_PARAMS));
}
use of de.mossgrabers.controller.ni.maschine.mk3.controller.MaschineControlSurface in project DrivenByMoss by git-moss.
the class MaschineControllerSetup method handleTrackChange.
/**
* Handle a track selection change.
*
* @param isSelected Has the track been selected?
*/
private void handleTrackChange(final boolean isSelected) {
if (!isSelected)
return;
final MaschineControlSurface surface = this.getSurface();
final ViewManager viewManager = surface.getViewManager();
if (viewManager.isActive(Views.PLAY))
viewManager.getActive().updateNoteMapping();
// Reset drum octave because the drum pad bank is also reset
this.scales.resetDrumOctave();
if (viewManager.isActive(Views.DRUM))
viewManager.get(Views.DRUM).updateNoteMapping();
}
use of de.mossgrabers.controller.ni.maschine.mk3.controller.MaschineControlSurface in project DrivenByMoss by git-moss.
the class MaschineControllerSetup method layoutMikroMk3.
private void layoutMikroMk3() {
final MaschineControlSurface surface = this.getSurface();
surface.getButton(ButtonID.PAD1).setBounds(427.0, 336.0, 76.25, 79.0);
surface.getButton(ButtonID.PAD2).setBounds(517.75, 336.75, 76.25, 79.0);
surface.getButton(ButtonID.PAD3).setBounds(608.25, 336.75, 76.25, 79.0);
surface.getButton(ButtonID.PAD4).setBounds(696.25, 336.75, 76.25, 79.0);
surface.getButton(ButtonID.PAD5).setBounds(427.0, 246.5, 76.25, 79.0);
surface.getButton(ButtonID.PAD6).setBounds(517.75, 247.0, 76.25, 79.0);
surface.getButton(ButtonID.PAD7).setBounds(608.25, 247.25, 76.25, 79.0);
surface.getButton(ButtonID.PAD8).setBounds(696.25, 247.0, 76.25, 79.0);
surface.getButton(ButtonID.PAD9).setBounds(427.0, 156.75, 76.25, 79.0);
surface.getButton(ButtonID.PAD10).setBounds(517.75, 157.5, 76.25, 79.0);
surface.getButton(ButtonID.PAD11).setBounds(608.25, 157.75, 76.25, 79.0);
surface.getButton(ButtonID.PAD12).setBounds(696.25, 157.0, 76.25, 79.0);
surface.getButton(ButtonID.PAD13).setBounds(427.0, 67.25, 76.25, 79.0);
surface.getButton(ButtonID.PAD14).setBounds(517.75, 67.75, 76.25, 79.0);
surface.getButton(ButtonID.PAD15).setBounds(608.25, 68.25, 76.25, 79.0);
surface.getButton(ButtonID.PAD16).setBounds(696.25, 67.25, 76.25, 79.0);
surface.getButton(ButtonID.PLAY).setBounds(26.25, 381.5, 55.75, 32.0);
surface.getButton(ButtonID.RECORD).setBounds(98.25, 381.5, 55.75, 32.0);
surface.getButton(ButtonID.STOP).setBounds(167.75, 381.5, 55.75, 32.0);
surface.getButton(ButtonID.LOOP).setBounds(26.25, 350.5, 56.0, 18.0);
surface.getButton(ButtonID.DELETE).setBounds(98.25, 350.5, 56.0, 18.0);
surface.getButton(ButtonID.TAP_TEMPO).setBounds(167.75, 350.5, 56.0, 18.0);
surface.getButton(ButtonID.FLIP).setBounds(238.0, 350.5, 56.0, 18.0);
surface.getButton(ButtonID.NEW).setBounds(26.25, 280.5, 55.75, 32.0);
surface.getButton(ButtonID.AUTOMATION).setBounds(98.25, 280.5, 55.75, 32.0);
surface.getButton(ButtonID.OVERDUB).setBounds(167.75, 280.5, 55.75, 32.0);
surface.getButton(ButtonID.REPEAT).setBounds(238.0, 280.5, 55.75, 32.0);
surface.getButton(ButtonID.F1).setBounds(26.25, 170.0, 58.0, 19.0);
surface.getButton(ButtonID.F2).setBounds(98.25, 170.75, 57.25, 18.25);
surface.getButton(ButtonID.F3).setBounds(167.75, 170.75, 57.25, 18.25);
surface.getButton(ButtonID.F4).setBounds(238.0, 170.75, 57.25, 18.25);
surface.getButton(ButtonID.FADER_TOUCH_1).setBounds(74.0, 21.25, 69.5, 22.75);
surface.getButton(ButtonID.VOLUME).setBounds(166.0, 25.75, 58.0, 19.0);
surface.getButton(ButtonID.SWING).setBounds(166.0, 56.75, 58.0, 19.0);
surface.getButton(ButtonID.TEMPO_TOUCH).setBounds(166.0, 85.75, 58.0, 19.0);
surface.getButton(ButtonID.DEVICE).setBounds(238.0, 25.75, 58.0, 19.0);
surface.getButton(ButtonID.DEVICE_ON_OFF).setBounds(238.0, 56.75, 58.0, 19.0);
surface.getButton(ButtonID.ADD_TRACK).setBounds(26.25, 22.75, 25.5, 25.0);
surface.getButton(ButtonID.ADD_EFFECT).setBounds(26.25, 51.75, 25.5, 25.0);
surface.getButton(ButtonID.BROWSE).setBounds(26.25, 80.75, 25.5, 25.0);
surface.getButton(ButtonID.ACCENT).setBounds(346.25, 25.75, 58.0, 20.75);
surface.getButton(ButtonID.SCENE1).setBounds(348.0, 67.0, 58.0, 34.0);
surface.getButton(ButtonID.CLIP).setBounds(348.0, 110.75, 58.0, 34.0);
surface.getButton(ButtonID.NOTE).setBounds(348.0, 154.5, 58.0, 34.0);
surface.getButton(ButtonID.TOGGLE_DEVICE).setBounds(348.0, 198.25, 58.0, 41.25);
surface.getButton(ButtonID.DUPLICATE).setBounds(348.75, 246.5, 58.0, 34.0);
surface.getButton(ButtonID.SELECT).setBounds(348.0, 293.0, 58.0, 34.0);
surface.getButton(ButtonID.SOLO).setBounds(348.0, 336.75, 58.0, 34.0);
surface.getButton(ButtonID.MUTE).setBounds(348.0, 380.5, 58.0, 34.0);
surface.getButton(ButtonID.ROW1_1).setBounds(427.0, 25.75, 78.0, 20.75);
surface.getButton(ButtonID.ROW1_2).setBounds(517.75, 25.75, 78.0, 20.75);
surface.getButton(ButtonID.ROW1_3).setBounds(608.25, 25.75, 78.0, 20.75);
surface.getButton(ButtonID.ROW1_4).setBounds(696.25, 25.75, 78.0, 20.75);
surface.getContinuous(ContinuousID.MASTER_KNOB).setBounds(75.0, 50.0, 64.0, 63.0);
surface.getContinuous(ContinuousID.CROSSFADER).setBounds(26.25, 204.0, 268.0, 50.0);
}
use of de.mossgrabers.controller.ni.maschine.mk3.controller.MaschineControlSurface in project DrivenByMoss by git-moss.
the class MaschineControllerSetup method registerCursorKeys.
private void registerCursorKeys(final MaschineControlSurface surface) {
if (!this.maschine.hasCursorKeys())
return;
this.addButton(ButtonID.ARROW_LEFT, "LEFT", new MaschineCursorCommand(Direction.LEFT, this.model, surface), MaschineControlSurface.CURSOR_LEFT, () -> this.getEncoderColor(ButtonID.ARROW_LEFT));
this.addButton(ButtonID.ARROW_RIGHT, "RIGHT", new MaschineCursorCommand(Direction.RIGHT, this.model, surface), MaschineControlSurface.CURSOR_RIGHT, () -> this.getEncoderColor(ButtonID.ARROW_RIGHT));
this.addButton(ButtonID.ARROW_UP, "UP", new ModeCursorCommand<>(Direction.UP, this.model, surface, false), MaschineControlSurface.CURSOR_UP, () -> this.getEncoderColor(ButtonID.ARROW_UP));
this.addButton(ButtonID.ARROW_DOWN, "DOWN", new ModeCursorCommand<>(Direction.DOWN, this.model, surface, false), MaschineControlSurface.CURSOR_DOWN, () -> this.getEncoderColor(ButtonID.ARROW_DOWN));
this.addButton(ButtonID.PAGE_LEFT, "PAGE LEFT", new PageCommand(Direction.LEFT, this.model, surface), MaschineControlSurface.PAGE_LEFT);
this.addButton(ButtonID.PAGE_RIGHT, "PAGE RIGHT", new PageCommand(Direction.RIGHT, this.model, surface), MaschineControlSurface.PAGE_RIGHT);
this.addButton(ButtonID.LAYOUT_ARRANGE, this.maschine == Maschine.STUDIO ? "ARRANGE" : "ARRANGER", new LayoutCommand<>(this.model, surface), MaschineControlSurface.ARRANGER);
this.addButton(ButtonID.MIXER, this.maschine == Maschine.STUDIO ? "MIX" : "MIXER", new PaneCommand<>(Panels.MIXER, this.model, surface), MaschineControlSurface.MIXER);
this.addButton(ButtonID.DRUM, this.maschine == Maschine.MK2 ? "CONTROL" : "CHANNEL", new AddTrackCommand<>(this.model, surface, null, ButtonID.STOP), MaschineControlSurface.CHANNEL);
}
Aggregations