use of de.mossgrabers.framework.controller.grid.PadGrid in project DrivenByMoss by git-moss.
the class BrowserView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final PadGrid padGrid = this.surface.getPadGrid();
padGrid.light(36, APCminiColors.APC_COLOR_RED_BLINK);
padGrid.light(37, APCminiColors.APC_COLOR_BLACK);
for (int i = 38; i < 42; i++) padGrid.light(i, APCminiColors.APC_COLOR_YELLOW);
padGrid.light(42, APCminiColors.APC_COLOR_BLACK);
padGrid.light(43, APCminiColors.APC_COLOR_GREEN_BLINK);
for (int i = 44; i < 52; i++) padGrid.light(i, APCminiColors.APC_COLOR_BLACK);
for (int i = 52; i < 60; i++) padGrid.light(i, COLUMN_COLORS[i - 52]);
for (int i = 60; i < 68; i++) padGrid.light(i, COLUMN_COLORS[i - 60]);
for (int i = 68; i < 76; i++) padGrid.light(i, COLUMN_COLORS[i - 68]);
for (int i = 76; i < 84; i++) padGrid.light(i, COLUMN_COLORS[i - 76]);
for (int i = 84; i < 100; i++) padGrid.light(i, APCminiColors.APC_COLOR_BLACK);
}
use of de.mossgrabers.framework.controller.grid.PadGrid in project DrivenByMoss by git-moss.
the class BrowserView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final PadGrid padGrid = this.surface.getPadGrid();
padGrid.light(36, BeatstepColors.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(37, BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
for (int i = 2; i < 6; i++) padGrid.light(36 + i, BeatstepColors.BEATSTEP_BUTTON_STATE_PINK);
padGrid.light(42, BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(43, BeatstepColors.BEATSTEP_BUTTON_STATE_BLUE);
padGrid.light(44, BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(45, BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
for (int i = 10; i < 14; i++) padGrid.light(36 + i, BeatstepColors.BEATSTEP_BUTTON_STATE_PINK);
padGrid.light(50, BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(51, BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
}
use of de.mossgrabers.framework.controller.grid.PadGrid in project DrivenByMoss by git-moss.
the class DrumView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final PadGrid padGrid = this.surface.getPadGrid();
if (!this.model.canSelectedTrackHoldNotes()) {
padGrid.turnOff();
return;
}
if (this.isPlayMode) {
final ICursorDevice primary = this.model.getPrimaryDevice();
final boolean hasDrumPads = primary.hasDrumPads();
boolean isSoloed = false;
if (hasDrumPads) {
for (int i = 0; i < 16; i++) {
if (primary.getDrumPad(i).isSolo()) {
isSoloed = true;
break;
}
}
}
for (int y = 0; y < 2; y++) {
for (int x = 0; x < 8; x++) {
final int index = 8 * y + x;
padGrid.lightEx(x, y, this.getPadColor(index, primary, isSoloed));
}
}
} else {
final ICursorClip clip = this.getClip();
// Paint the sequencer steps
final int step = clip.getCurrentStep();
final int hiStep = this.isInXRange(step) ? step % DrumView.NUM_DISPLAY_COLS : -1;
for (int col = 0; col < DrumView.NUM_DISPLAY_COLS; col++) {
final int isSet = clip.getStep(col, this.offsetY + this.selectedPad);
final boolean hilite = col == hiStep;
final int x = col % 8;
final int y = col / 8;
padGrid.lightEx(x, 1 - y, isSet > 0 ? hilite ? BeatstepColors.BEATSTEP_BUTTON_STATE_PINK : BeatstepColors.BEATSTEP_BUTTON_STATE_BLUE : hilite ? BeatstepColors.BEATSTEP_BUTTON_STATE_PINK : BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
}
}
}
use of de.mossgrabers.framework.controller.grid.PadGrid in project DrivenByMoss by git-moss.
the class ShiftView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final ITransport t = this.model.getTransport();
final PadGrid padGrid = this.surface.getPadGrid();
padGrid.light(36, t.isPlaying() ? BeatstepColors.BEATSTEP_BUTTON_STATE_PINK : BeatstepColors.BEATSTEP_BUTTON_STATE_BLUE);
padGrid.light(37, t.isRecording() ? BeatstepColors.BEATSTEP_BUTTON_STATE_PINK : BeatstepColors.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(38, t.isLoop() ? BeatstepColors.BEATSTEP_BUTTON_STATE_PINK : BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(39, t.isMetronomeOn() ? BeatstepColors.BEATSTEP_BUTTON_STATE_PINK : BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(40, BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(41, BeatstepColors.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(42, BeatstepColors.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(43, BeatstepColors.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(44, BeatstepColors.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(45, BeatstepColors.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(46, BeatstepColors.BEATSTEP_BUTTON_STATE_PINK);
padGrid.light(47, BeatstepColors.BEATSTEP_BUTTON_STATE_PINK);
padGrid.light(48, BeatstepColors.BEATSTEP_BUTTON_STATE_PINK);
padGrid.light(49, BeatstepColors.BEATSTEP_BUTTON_STATE_BLUE);
padGrid.light(50, BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(51, BeatstepColors.BEATSTEP_BUTTON_STATE_PINK);
}
use of de.mossgrabers.framework.controller.grid.PadGrid in project DrivenByMoss by git-moss.
the class TrackView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final IChannelBank tb = this.model.getCurrentTrackBank();
final PadGrid padGrid = this.surface.getPadGrid();
for (int i = 0; i < 8; i++) padGrid.light(44 + i, tb.getTrack(i).isSelected() ? BeatstepColors.BEATSTEP_BUTTON_STATE_BLUE : BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
final ITrack sel = tb.getSelectedTrack();
padGrid.light(36, sel != null && sel.isActivated() ? BeatstepColors.BEATSTEP_BUTTON_STATE_RED : BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(37, BeatstepColors.BEATSTEP_BUTTON_STATE_BLUE);
padGrid.light(38, BeatstepColors.BEATSTEP_BUTTON_STATE_BLUE);
padGrid.light(39, BeatstepColors.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(40, BeatstepColors.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(41, BeatstepColors.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(42, BeatstepColors.BEATSTEP_BUTTON_STATE_BLUE);
padGrid.light(43, BeatstepColors.BEATSTEP_BUTTON_STATE_BLUE);
}
Aggregations