Search in sources :

Example 1 with IPadGrid

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));
}
Also used : IPadGrid(de.mossgrabers.framework.controller.grid.IPadGrid)

Example 2 with IPadGrid

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);
}
Also used : IPadGrid(de.mossgrabers.framework.controller.grid.IPadGrid) IParameterPageBank(de.mossgrabers.framework.daw.data.bank.IParameterPageBank) ICursorDevice(de.mossgrabers.framework.daw.data.ICursorDevice)

Example 3 with IPadGrid

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);
}
Also used : IPadGrid(de.mossgrabers.framework.controller.grid.IPadGrid) ITransport(de.mossgrabers.framework.daw.ITransport)

Example 4 with IPadGrid

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);
}
Also used : IPadGrid(de.mossgrabers.framework.controller.grid.IPadGrid) INoteRepeat(de.mossgrabers.framework.daw.midi.INoteRepeat)

Example 5 with IPadGrid

use of de.mossgrabers.framework.controller.grid.IPadGrid in project DrivenByMoss by git-moss.

the class PlayView method drawGrid.

/**
 * {@inheritDoc}
 */
@Override
public void drawGrid() {
    super.drawGrid();
    if (!this.playControls)
        return;
    final IPadGrid padGrid = this.surface.getPadGrid();
    final int startNote = this.scales.getStartNote();
    padGrid.light(startNote, this.isSustain ? LaunchpadColorManager.LAUNCHPAD_COLOR_YELLOW_HI : LaunchpadColorManager.LAUNCHPAD_COLOR_YELLOW_LO);
    padGrid.light(startNote + 1, this.isPitchDown ? LaunchpadColorManager.LAUNCHPAD_COLOR_CYAN_HI : LaunchpadColorManager.LAUNCHPAD_COLOR_CYAN_LO);
    padGrid.light(startNote + 2, this.isPitchUp ? LaunchpadColorManager.LAUNCHPAD_COLOR_CYAN_HI : LaunchpadColorManager.LAUNCHPAD_COLOR_CYAN_LO);
    for (int i = 0; i < 5; i++) padGrid.light(startNote + 3 + i, this.isModulation == i ? LaunchpadColorManager.LAUNCHPAD_COLOR_MAGENTA_HI : LaunchpadColorManager.LAUNCHPAD_COLOR_MAGENTA_LO);
}
Also used : IPadGrid(de.mossgrabers.framework.controller.grid.IPadGrid)

Aggregations

IPadGrid (de.mossgrabers.framework.controller.grid.IPadGrid)50 INoteClip (de.mossgrabers.framework.daw.INoteClip)13 ITrack (de.mossgrabers.framework.daw.data.ITrack)11 ITrackBank (de.mossgrabers.framework.daw.data.bank.ITrackBank)10 IStepInfo (de.mossgrabers.framework.daw.IStepInfo)7 GridStep (de.mossgrabers.framework.daw.data.GridStep)7 IDrumDevice (de.mossgrabers.framework.daw.data.IDrumDevice)7 ColorEx (de.mossgrabers.framework.controller.color.ColorEx)4 ITransport (de.mossgrabers.framework.daw.ITransport)3 ICursorDevice (de.mossgrabers.framework.daw.data.ICursorDevice)3 INoteRepeat (de.mossgrabers.framework.daw.midi.INoteRepeat)3 StepState (de.mossgrabers.framework.daw.StepState)2 IScene (de.mossgrabers.framework.daw.data.IScene)2 IParameterPageBank (de.mossgrabers.framework.daw.data.bank.IParameterPageBank)2 ISceneBank (de.mossgrabers.framework.daw.data.bank.ISceneBank)2 Views (de.mossgrabers.framework.view.Views)2 LaunchpadConfiguration (de.mossgrabers.controller.novation.launchpad.LaunchpadConfiguration)1 LightInfo (de.mossgrabers.framework.controller.grid.LightInfo)1 DAWColor (de.mossgrabers.framework.daw.DAWColor)1 IHost (de.mossgrabers.framework.daw.IHost)1