use of de.mossgrabers.controller.novation.launchkey.mini.controller.LaunchkeyMiniMk3ControlSurface in project DrivenByMoss by git-moss.
the class LaunchkeyMiniMk3ControllerSetup method createModeButton.
private void createModeButton(final ButtonID buttonID, final OutputID outputID, final String label, final Modes mode, final int modeIndex) {
final LaunchkeyMiniMk3ControlSurface surface = this.getSurface();
final ModeSelectCommand<LaunchkeyMiniMk3ControlSurface, LaunchkeyMiniMk3Configuration> modeSelectCommand = new ModeSelectCommand<>(this.model, surface, mode);
this.addButton(surface, buttonID, label, (event, velocity) -> modeSelectCommand.executeNormal(event), 15, LaunchkeyMiniMk3ControlSurface.LAUNCHKEY_MODE_SELECT, modeIndex, false, null);
final IHwLight light = surface.createLight(outputID, () -> surface.getModeManager().isActive(mode) ? ColorEx.GREEN : ColorEx.DARK_GREEN, color -> {
// Intentionally empty
});
surface.getButton(buttonID).addLight(light);
}
use of de.mossgrabers.controller.novation.launchkey.mini.controller.LaunchkeyMiniMk3ControlSurface in project DrivenByMoss by git-moss.
the class LaunchkeyMiniMk3ControllerSetup method createSurface.
/**
* {@inheritDoc}
*/
@Override
protected void createSurface() {
final IMidiAccess midiAccess = this.factory.createMidiAccess();
final IMidiOutput output = midiAccess.createOutput();
final IMidiInput input = midiAccess.createInput("Pads", "80????", "90????", "81????", "91????", "82????", "92????", "83????", "93????", "84????", "94????", "85????", "95????", "86????", "96????", "87????", "97????", "88????", "98????", "89????", "99????", "8A????", "9A????", "8B????", "9B????", "8C????", "9C????", "8D????", "9D????", "8E????", "9E????");
this.inputKeys = midiAccess.createInput(1, "Keyboard", "8?????", /* Note off */
"9?????", /* Note on */
"B?01??", /* Modulation */
"B?40??", /* Sustainpedal */
"E?????");
final LaunchkeyMiniMk3ControlSurface surface = new LaunchkeyMiniMk3ControlSurface(this.host, this.colorManager, this.configuration, output, input, this::processProgramChangeAction);
this.surfaces.add(surface);
surface.addPianoKeyboard(25, this.inputKeys, true);
this.mvHelper = new MVHelper<>(this.model, surface);
}
use of de.mossgrabers.controller.novation.launchkey.mini.controller.LaunchkeyMiniMk3ControlSurface in project DrivenByMoss by git-moss.
the class LaunchkeyMiniMk3ControllerSetup method createViewButton.
private void createViewButton(final ButtonID buttonID, final OutputID outputID, final String label, final Views view, final int viewIndex) {
final LaunchkeyMiniMk3ControlSurface surface = this.getSurface();
final ViewMultiSelectCommand<LaunchkeyMiniMk3ControlSurface, LaunchkeyMiniMk3Configuration> viewSelectCommand = new ViewMultiSelectCommand<>(this.model, surface, true, view);
this.addButton(surface, buttonID, label, (event, velocity) -> {
viewSelectCommand.executeNormal(event);
surface.getPadGrid().setView(view);
}, 15, LaunchkeyMiniMk3ControlSurface.LAUNCHKEY_VIEW_SELECT, viewIndex, false, null);
final IHwLight light = surface.createLight(outputID, () -> surface.getViewManager().isActive(view) ? ColorEx.ORANGE : ColorEx.DARK_ORANGE, color -> {
// Intentionally empty
});
surface.getButton(buttonID).addLight(light);
}
use of de.mossgrabers.controller.novation.launchkey.mini.controller.LaunchkeyMiniMk3ControlSurface in project DrivenByMoss by git-moss.
the class LaunchkeyMiniMk3ControllerSetup method layoutControls.
/**
* {@inheritDoc}
*/
@Override
protected void layoutControls() {
final LaunchkeyMiniMk3ControlSurface surface = this.getSurface();
surface.getButton(ButtonID.PAD1).setBounds(193.5, 127.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD2).setBounds(247.0, 127.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD3).setBounds(301.0, 127.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD4).setBounds(354.75, 127.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD5).setBounds(408.0, 127.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD6).setBounds(462.5, 127.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD7).setBounds(516.25, 127.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD8).setBounds(570.0, 127.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD9).setBounds(193.5, 75.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD10).setBounds(247.0, 75.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD11).setBounds(301.0, 75.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD12).setBounds(354.75, 75.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD13).setBounds(408.0, 75.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD14).setBounds(462.5, 75.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD15).setBounds(516.25, 75.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD16).setBounds(570.0, 75.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD17).setBounds(193.5, 257.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD18).setBounds(247.0, 257.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD19).setBounds(301.0, 257.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD20).setBounds(354.75, 257.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD21).setBounds(408.0, 257.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD22).setBounds(462.5, 257.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD23).setBounds(516.25, 257.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD24).setBounds(570.0, 257.5, 47.0, 46.5);
surface.getButton(ButtonID.PAD25).setBounds(193.5, 203.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD26).setBounds(247.0, 203.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD27).setBounds(301.0, 203.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD28).setBounds(354.75, 203.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD29).setBounds(408.0, 203.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD30).setBounds(462.5, 203.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD31).setBounds(516.25, 203.75, 47.0, 46.5);
surface.getButton(ButtonID.PAD32).setBounds(570.0, 203.75, 47.0, 46.5);
surface.getButton(ButtonID.ROW1_1).setBounds(354.75, 333.25, 47.0, 46.5);
surface.getButton(ButtonID.ROW1_2).setBounds(408.0, 333.25, 47.0, 46.5);
surface.getButton(ButtonID.ROW1_3).setBounds(462.5, 333.25, 47.0, 46.5);
surface.getButton(ButtonID.ROW1_4).setBounds(516.25, 333.25, 47.0, 46.5);
surface.getButton(ButtonID.ROW1_5).setBounds(570.0, 333.25, 47.0, 46.5);
surface.getButton(ButtonID.ROW1_6).setBounds(624.0, 333.25, 47.0, 46.5);
surface.getButton(ButtonID.ROW2_1).setBounds(193.5, 333.25, 47.0, 46.5);
surface.getButton(ButtonID.ROW2_2).setBounds(247.0, 333.25, 47.0, 46.5);
surface.getButton(ButtonID.ROW2_3).setBounds(301.0, 333.25, 47.0, 46.5);
surface.getButton(ButtonID.SHIFT).setBounds(138.0, 31.0, 38.5, 19.25);
surface.getButton(ButtonID.PLAY).setBounds(687.0, 155.0, 38.5, 19.25);
surface.getButton(ButtonID.RECORD).setBounds(732.25, 155.0, 38.5, 19.25);
surface.getButton(ButtonID.MOVE_TRACK_LEFT).setBounds(687.0, 102.75, 38.5, 19.25);
surface.getButton(ButtonID.MOVE_TRACK_RIGHT).setBounds(732.25, 102.75, 38.5, 19.25);
surface.getButton(ButtonID.SCENE1).setBounds(623.75, 75.5, 47.0, 46.5);
surface.getButton(ButtonID.SCENE2).setBounds(623.75, 127.75, 47.0, 46.5);
surface.getButton(ButtonID.CONTROL).setBounds(15.5, 26.5, 49.75, 29.0);
surface.getContinuous(ContinuousID.KNOB1).setBounds(203.0, 5, 25.5, 25.0);
surface.getContinuous(ContinuousID.KNOB2).setBounds(256.75, 5, 25.5, 25.0);
surface.getContinuous(ContinuousID.KNOB3).setBounds(310.75, 5, 25.5, 25.0);
surface.getContinuous(ContinuousID.KNOB4).setBounds(364.5, 5, 25.5, 25.0);
surface.getContinuous(ContinuousID.KNOB5).setBounds(418.5, 5, 25.5, 25.0);
surface.getContinuous(ContinuousID.KNOB6).setBounds(472.25, 5, 25.5, 25.0);
surface.getContinuous(ContinuousID.KNOB7).setBounds(526.25, 5, 25.5, 25.0);
surface.getContinuous(ContinuousID.KNOB8).setBounds(580.0, 5, 25.5, 25.0);
surface.getContinuous(ContinuousID.DEVICE_KNOB1).setBounds(203.0, 30, 25.5, 25.0);
surface.getContinuous(ContinuousID.DEVICE_KNOB2).setBounds(256.75, 30, 25.5, 25.0);
surface.getContinuous(ContinuousID.DEVICE_KNOB3).setBounds(310.75, 30, 25.5, 25.0);
surface.getContinuous(ContinuousID.DEVICE_KNOB4).setBounds(364.5, 30, 25.5, 25.0);
surface.getContinuous(ContinuousID.DEVICE_KNOB5).setBounds(418.5, 30, 25.5, 25.0);
surface.getContinuous(ContinuousID.DEVICE_KNOB6).setBounds(472.25, 30, 25.5, 25.0);
surface.getContinuous(ContinuousID.DEVICE_KNOB7).setBounds(526.25, 30, 25.5, 25.0);
surface.getContinuous(ContinuousID.DEVICE_KNOB8).setBounds(580.0, 30, 25.5, 25.0);
surface.getContinuous(ContinuousID.MODULATION_WHEEL).setBounds(91.25, 77.5, 31.75, 171.25);
surface.getContinuous(ContinuousID.PITCHBEND_WHEEL).setBounds(48.0, 77.5, 31.75, 171.25);
surface.getPianoKeyboard().setBounds(40.0, 422.0, 726.75, 175.75);
}
Aggregations