use of de.mossgrabers.framework.controller.grid.IPadGrid in project DrivenByMoss by git-moss.
the class ColorView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final IPadGrid padGrid = this.surface.getPadGrid();
final DAWColor[] dawColors = DAWColor.values();
final int offset = this.page * this.pageSize;
for (int i = 0; i < this.pageSize; i++) {
final int index = offset + i;
padGrid.light(36 + i, index < dawColors.length ? dawColors[index].name() : IPadGrid.GRID_OFF);
}
}
use of de.mossgrabers.framework.controller.grid.IPadGrid in project DrivenByMoss by git-moss.
the class PlayView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final boolean isKeyboardEnabled = this.model.canSelectedTrackHoldNotes();
final IPadGrid padGrid = this.surface.getPadGrid();
for (int i = 36; i < 52; i++) padGrid.light(i, this.getPadColor(isKeyboardEnabled, i));
}
use of de.mossgrabers.framework.controller.grid.IPadGrid in project DrivenByMoss by git-moss.
the class DeviceView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final ICursorDevice cd = this.model.getCursorDevice();
final IParameterPageBank parameterPageBank = cd.getParameterPageBank();
final int selectedItemIndex = parameterPageBank.getSelectedItemIndex();
final IPadGrid padGrid = this.surface.getPadGrid();
for (int i = 0; i < parameterPageBank.getPageSize(); i++) padGrid.light(44 + i, i == selectedItemIndex ? BeatstepColorManager.BEATSTEP_BUTTON_STATE_BLUE : BeatstepColorManager.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(36, cd.isEnabled() ? BeatstepColorManager.BEATSTEP_BUTTON_STATE_RED : BeatstepColorManager.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(37, BeatstepColorManager.BEATSTEP_BUTTON_STATE_BLUE);
padGrid.light(38, BeatstepColorManager.BEATSTEP_BUTTON_STATE_BLUE);
padGrid.light(39, BeatstepColorManager.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(40, BeatstepColorManager.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(41, BeatstepColorManager.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(42, BeatstepColorManager.BEATSTEP_BUTTON_STATE_BLUE);
padGrid.light(43, BeatstepColorManager.BEATSTEP_BUTTON_STATE_BLUE);
}
use of de.mossgrabers.framework.controller.grid.IPadGrid in project DrivenByMoss by git-moss.
the class ShiftView method drawGrid.
/**
* {@inheritDoc}
*/
@Override
public void drawGrid() {
final ITransport t = this.model.getTransport();
final IPadGrid padGrid = this.surface.getPadGrid();
padGrid.light(36, t.isPlaying() ? BeatstepColorManager.BEATSTEP_BUTTON_STATE_PINK : BeatstepColorManager.BEATSTEP_BUTTON_STATE_BLUE);
padGrid.light(37, t.isRecording() ? BeatstepColorManager.BEATSTEP_BUTTON_STATE_PINK : BeatstepColorManager.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(38, t.isLoop() ? BeatstepColorManager.BEATSTEP_BUTTON_STATE_PINK : BeatstepColorManager.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(39, t.isMetronomeOn() ? BeatstepColorManager.BEATSTEP_BUTTON_STATE_PINK : BeatstepColorManager.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(40, BeatstepColorManager.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(41, BeatstepColorManager.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(42, BeatstepColorManager.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(43, BeatstepColorManager.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(44, BeatstepColorManager.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(45, BeatstepColorManager.BEATSTEP_BUTTON_STATE_RED);
padGrid.light(46, BeatstepColorManager.BEATSTEP_BUTTON_STATE_PINK);
padGrid.light(47, BeatstepColorManager.BEATSTEP_BUTTON_STATE_PINK);
padGrid.light(48, BeatstepColorManager.BEATSTEP_BUTTON_STATE_PINK);
padGrid.light(49, BeatstepColorManager.BEATSTEP_BUTTON_STATE_BLUE);
padGrid.light(50, BeatstepColorManager.BEATSTEP_BUTTON_STATE_OFF);
padGrid.light(51, BeatstepColorManager.BEATSTEP_BUTTON_STATE_PINK);
}
use of de.mossgrabers.framework.controller.grid.IPadGrid in project DrivenByMoss by git-moss.
the class DrumView method drawPages.
/**
* {@inheritDoc}
*/
@Override
protected void drawPages(final INoteClip clip, final boolean isActive) {
super.drawPages(clip, isActive);
// Draw the extra buttons
final IPadGrid padGrid = this.surface.getPadGrid();
if (this.extraButtonsOn) {
padGrid.lightEx(4, 6, this.isSelectTrigger() ? LaunchpadColorManager.LAUNCHPAD_COLOR_WHITE : LaunchpadColorManager.LAUNCHPAD_COLOR_GREY_LO);
padGrid.lightEx(5, 6, this.isMuteTrigger() ? LaunchpadColorManager.LAUNCHPAD_COLOR_YELLOW_HI : LaunchpadColorManager.LAUNCHPAD_COLOR_YELLOW_LO);
padGrid.lightEx(6, 6, this.isSoloTrigger() ? LaunchpadColorManager.LAUNCHPAD_COLOR_BLUE_HI : LaunchpadColorManager.LAUNCHPAD_COLOR_BLUE_LO);
padGrid.lightEx(7, 6, this.isBrowseTrigger() ? LaunchpadColorManager.LAUNCHPAD_COLOR_CYAN_HI : LaunchpadColorManager.LAUNCHPAD_COLOR_CYAN_LO);
final INoteRepeat noteRepeat = this.surface.getMidiInput().getDefaultNoteInput().getNoteRepeat();
padGrid.lightEx(4, 7, noteRepeat.isActive() ? LaunchpadColorManager.LAUNCHPAD_COLOR_ORCHID_HI : LaunchpadColorManager.LAUNCHPAD_COLOR_ORCHID_LO);
padGrid.lightEx(5, 7, this.noteRepeatPeriodOn ? LaunchpadColorManager.LAUNCHPAD_COLOR_SKY_HI : LaunchpadColorManager.LAUNCHPAD_COLOR_SKY_LO);
padGrid.lightEx(6, 7, this.noteRepeatLengthOn ? LaunchpadColorManager.LAUNCHPAD_COLOR_PINK_HI : LaunchpadColorManager.LAUNCHPAD_COLOR_PINK_LO);
}
padGrid.lightEx(7, 7, this.extraButtonsOn ? LaunchpadColorManager.LAUNCHPAD_COLOR_RED_HI : LaunchpadColorManager.LAUNCHPAD_COLOR_RED_LO);
}
Aggregations