use of de.mossgrabers.framework.controller.grid.IPadGrid in project DrivenByMoss by git-moss.
the class PadModeSelectView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final IPadGrid pads = this.surface.getPadGrid();
for (int x = 0; x < 8; x++) pads.lightEx(x, 0, LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_BLACK);
final SessionView view = (SessionView) this.surface.getViewManager().get(Views.SESSION);
final Modes padMode = view.getPadMode();
pads.lightEx(0, 1, padMode == null ? LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_GREEN_HI : LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_GREEN_LO);
pads.lightEx(1, 1, padMode == Modes.REC_ARM ? LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_RED_HI : LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_RED_LO);
pads.lightEx(2, 1, padMode == Modes.TRACK_SELECT ? LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_WHITE : LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_GREY_LO);
pads.lightEx(3, 1, padMode == Modes.MUTE ? LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_AMBER_HI : LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_AMBER_LO);
pads.lightEx(4, 1, padMode == Modes.SOLO ? LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_YELLOW_HI : LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_YELLOW_LO);
pads.lightEx(5, 1, padMode == Modes.STOP_CLIP ? LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_PINK_HI : LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_ROSE);
pads.lightEx(6, 1, LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_BLACK);
pads.lightEx(7, 1, LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_BLACK);
}
use of de.mossgrabers.framework.controller.grid.IPadGrid in project DrivenByMoss by git-moss.
the class DrumView method drawShiftedGrid.
private void drawShiftedGrid() {
final boolean isKeyboardEnabled = this.model.canSelectedTrackHoldNotes();
final IPadGrid padGrid = this.surface.getPadGrid();
for (int i = 36; i < 50; i++) padGrid.light(i, MaschineColorManager.COLOR_BLACK);
for (int i = 50; i < 52; i++) padGrid.light(i, isKeyboardEnabled ? MaschineColorManager.COLOR_SKIN : MaschineColorManager.COLOR_BLACK);
}
use of de.mossgrabers.framework.controller.grid.IPadGrid in project DrivenByMoss by git-moss.
the class DrumView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
if (this.isGridEditor) {
final IPadGrid padGrid = this.surface.getPadGrid();
for (int i = 0; i < 8; i++) padGrid.light(36 + i, this.getButtonColorID(ButtonID.get(ButtonID.SCENE1, 7 - i)));
for (int i = 8; i < 12; i++) padGrid.light(36 + i, MaschineColorManager.COLOR_BLACK);
for (int i = 12; i < 14; i++) padGrid.light(36 + i, MaschineColorManager.COLOR_BLUE);
for (int i = 14; i < 16; i++) padGrid.light(36 + i, MaschineColorManager.COLOR_BLACK);
return;
}
if (this.isSequencerVisible) {
final INoteClip clip = this.getClip();
final boolean isActive = this.isActive();
final IDrumDevice primary = this.model.getDrumDevice();
this.drawSequencerSteps(clip, isActive, this.scales.getDrumOffset() + this.selectedPad, this.getPadColor(primary, this.selectedPad), y -> 3 - y);
return;
}
if (this.isShifted)
this.drawShiftedGrid();
else
super.drawGrid();
}
use of de.mossgrabers.framework.controller.grid.IPadGrid in project DrivenByMoss by git-moss.
the class MuteView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final IPadGrid padGrid = this.surface.getPadGrid();
final ITrackBank tb = this.model.getCurrentTrackBank();
for (int i = 0; i < 16; i++) {
final ITrack item = tb.getItem(i);
final int x = i % 4;
final int y = 3 - i / 4;
if (item.doesExist()) {
final int colorIndex = this.colorManager.getColorIndex(DAWColor.getColorIndex(item.getColor()));
if (item.isMute())
padGrid.lightEx(x, y, colorIndex, MaschineColorManager.COLOR_DARK_GREY, false);
else
padGrid.lightEx(x, y, colorIndex);
} else
padGrid.lightEx(x, y, AbstractFeatureGroup.BUTTON_COLOR_OFF);
}
}
use of de.mossgrabers.framework.controller.grid.IPadGrid in project DrivenByMoss by git-moss.
the class ParameterView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final IPadGrid padGrid = this.surface.getPadGrid();
for (int i = 8; i < 12; i++) padGrid.lightEx(i % 4, 3 - i / 4, AbstractFeatureGroup.BUTTON_COLOR_OFF);
final ICursorDevice cursorDevice = this.model.getCursorDevice();
final boolean doesExist = cursorDevice.doesExist();
padGrid.lightEx(0, 0, doesExist && cursorDevice.canSelectPreviousFX() ? MaschineColorManager.COLOR_ROSE : MaschineColorManager.COLOR_BLACK);
padGrid.lightEx(1, 0, doesExist && cursorDevice.canSelectNextFX() ? MaschineColorManager.COLOR_ROSE : MaschineColorManager.COLOR_BLACK);
final IParameterBank parameterBank = cursorDevice.getParameterBank();
padGrid.lightEx(2, 0, doesExist && parameterBank.canScrollBackwards() ? MaschineColorManager.COLOR_SKIN : MaschineColorManager.COLOR_BLACK);
padGrid.lightEx(3, 0, doesExist && parameterBank.canScrollForwards() ? MaschineColorManager.COLOR_SKIN : MaschineColorManager.COLOR_BLACK);
final SelectedDeviceMode<?, ?> deviceMode = (SelectedDeviceMode<?, ?>) this.surface.getModeManager().get(Modes.DEVICE_PARAMS);
for (int i = 0; i < 8; i++) {
final int x = i % 4;
final int y = 2 + i / 4;
final IParameter item = parameterBank.getItem(i);
if (item.doesExist()) {
final int color = MaschineColorManager.PARAM_COLORS.get(i).intValue();
if (i == deviceMode.getSelectedParameter())
padGrid.lightEx(x, y, color, MaschineColorManager.COLOR_WHITE, false);
else
padGrid.lightEx(x, y, color);
} else
padGrid.lightEx(x, y, AbstractFeatureGroup.BUTTON_COLOR_OFF);
}
}
Aggregations