Search in sources :

Example 11 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)

Example 12 with IPadGrid

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

the class ProjectView method drawGrid.

/**
 * {@inheritDoc}
 */
@Override
public void drawGrid() {
    final IPadGrid padGrid = this.surface.getPadGrid();
    // ////////////////////////////////////////////////////////////////////
    // First row (from bottom)
    padGrid.light(36, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    // Toggle Note Editor
    padGrid.light(37, LaunchpadColorManager.LAUNCHPAD_COLOR_AMBER_HI);
    // Toggle Automation Editor
    padGrid.light(38, LaunchpadColorManager.LAUNCHPAD_COLOR_RED_HI);
    padGrid.light(39, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    // Toggle Devices
    padGrid.light(40, LaunchpadColorManager.LAUNCHPAD_COLOR_TURQUOISE_HI);
    padGrid.light(41, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    // Toggle Mixer
    padGrid.light(42, LaunchpadColorManager.LAUNCHPAD_COLOR_LIME_HI);
    padGrid.light(43, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    for (int i = 44; i < 52; i++) padGrid.light(i, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    // ////////////////////////////////////////////////////////////////////
    // Row 3
    padGrid.light(52, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    padGrid.light(53, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    // Select layout 1
    padGrid.light(54, LaunchpadColorManager.LAUNCHPAD_COLOR_BLUE_LO);
    padGrid.light(55, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    // Select layout 2
    padGrid.light(56, LaunchpadColorManager.LAUNCHPAD_COLOR_BLUE);
    padGrid.light(57, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    // Select layout 3
    padGrid.light(58, LaunchpadColorManager.LAUNCHPAD_COLOR_BLUE_HI);
    padGrid.light(59, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    for (int i = 60; i < 68; i++) padGrid.light(i, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    // ////////////////////////////////////////////////////////////////////
    // Row 5
    // Toggle inspector
    padGrid.light(68, LaunchpadColorManager.LAUNCHPAD_COLOR_PINK_HI);
    for (int i = 69; i < 75; i++) padGrid.light(i, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    // Toggle browser
    padGrid.light(75, LaunchpadColorManager.LAUNCHPAD_COLOR_MAGENTA);
    for (int i = 76; i < 92; i++) padGrid.light(i, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    // ////////////////////////////////////////////////////////////////////
    // Row 8
    padGrid.light(92, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    // Select Previous Project
    padGrid.light(93, LaunchpadColorManager.LAUNCHPAD_COLOR_OCEAN_HI);
    padGrid.light(94, LaunchpadColorManager.LAUNCHPAD_COLOR_OCEAN_HI);
    final boolean isEngineActive = this.model.getApplication().isEngineActive();
    padGrid.light(95, isEngineActive ? LaunchpadColorManager.LAUNCHPAD_COLOR_GREEN_HI : LaunchpadColorManager.LAUNCHPAD_COLOR_RED_LO);
    padGrid.light(96, isEngineActive ? LaunchpadColorManager.LAUNCHPAD_COLOR_GREEN_HI : LaunchpadColorManager.LAUNCHPAD_COLOR_RED_LO);
    // Select Next Project
    padGrid.light(97, LaunchpadColorManager.LAUNCHPAD_COLOR_OCEAN_HI);
    padGrid.light(98, LaunchpadColorManager.LAUNCHPAD_COLOR_OCEAN_HI);
    padGrid.light(99, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
}
Also used : IPadGrid(de.mossgrabers.framework.controller.grid.IPadGrid)

Example 13 with IPadGrid

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

the class ChordsView 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)

Example 14 with IPadGrid

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

the class NoteViewSelectView method drawGrid.

/**
 * {@inheritDoc}
 */
@Override
public void drawGrid() {
    final ViewManager viewManager = this.surface.getViewManager();
    final Views previousViewId = viewManager.getPreviousID();
    final IPadGrid padGrid = this.surface.getPadGrid();
    for (int i = 36; i < 60; i++) padGrid.light(i, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    padGrid.light(60, previousViewId == Views.SEQUENCER ? LaunchpadColorManager.LAUNCHPAD_COLOR_GREEN : LaunchpadColorManager.LAUNCHPAD_COLOR_AMBER_HI);
    padGrid.light(61, previousViewId == Views.POLY_SEQUENCER ? LaunchpadColorManager.LAUNCHPAD_COLOR_GREEN : LaunchpadColorManager.LAUNCHPAD_COLOR_AMBER_LO);
    padGrid.light(62, previousViewId == Views.RAINDROPS ? LaunchpadColorManager.LAUNCHPAD_COLOR_GREEN : LaunchpadColorManager.LAUNCHPAD_COLOR_AMBER);
    for (int i = 63; i < 76; i++) padGrid.light(i, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    padGrid.light(76, previousViewId == Views.DRUM ? LaunchpadColorManager.LAUNCHPAD_COLOR_GREEN : LaunchpadColorManager.LAUNCHPAD_COLOR_BLUE_HI);
    padGrid.light(77, previousViewId == Views.DRUM4 ? LaunchpadColorManager.LAUNCHPAD_COLOR_GREEN : LaunchpadColorManager.LAUNCHPAD_COLOR_BLUE);
    padGrid.light(78, previousViewId == Views.DRUM8 ? LaunchpadColorManager.LAUNCHPAD_COLOR_GREEN : LaunchpadColorManager.LAUNCHPAD_COLOR_BLUE_LO);
    for (int i = 79; i < 92; i++) padGrid.light(i, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
    padGrid.light(92, previousViewId == Views.PLAY ? LaunchpadColorManager.LAUNCHPAD_COLOR_GREEN : LaunchpadColorManager.LAUNCHPAD_COLOR_RED_HI);
    padGrid.light(93, previousViewId == Views.PIANO ? LaunchpadColorManager.LAUNCHPAD_COLOR_GREEN : LaunchpadColorManager.LAUNCHPAD_COLOR_RED);
    padGrid.light(94, previousViewId == Views.DRUM64 ? LaunchpadColorManager.LAUNCHPAD_COLOR_GREEN : LaunchpadColorManager.LAUNCHPAD_COLOR_RED_LO);
    for (int i = 95; i < 100; i++) padGrid.light(i, LaunchpadColorManager.LAUNCHPAD_COLOR_BLACK);
}
Also used : IPadGrid(de.mossgrabers.framework.controller.grid.IPadGrid) Views(de.mossgrabers.framework.view.Views) ViewManager(de.mossgrabers.framework.featuregroup.ViewManager)

Example 15 with IPadGrid

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

the class AbstractDrumLaneView method drawGrid.

/**
 * {@inheritDoc}
 */
@Override
public void drawGrid() {
    final IPadGrid padGrid = this.surface.getPadGrid();
    if (!this.isActive()) {
        padGrid.turnOff();
        return;
    }
    // Clip length/loop area
    final INoteClip clip = this.getClip();
    final int step = clip.getCurrentStep();
    // Paint the sequencer steps
    final int hiStep = this.isInXRange(step) ? step % this.clipCols : -1;
    final int offsetY = this.scales.getDrumOffset();
    final int editMidiChannel = this.configuration.getMidiEditChannel();
    final List<GridStep> editNotes = this.getEditNotes();
    for (int sound = 0; sound < this.lanes; sound++) {
        final int noteRow = offsetY + sound;
        final Optional<ColorEx> drumPadColor = this.getPadColor(this.primary, sound);
        for (int col = 0; col < this.clipCols; col++) {
            final IStepInfo stepInfo = clip.getStep(editMidiChannel, col, noteRow);
            final boolean hilite = col == hiStep;
            final int x = col % this.numColumns;
            int y = this.lanes - 1 - sound;
            if (col >= this.numColumns)
                y += this.lanes;
            padGrid.lightEx(x, y, this.getStepColor(stepInfo, hilite, drumPadColor, editMidiChannel, col, noteRow, editNotes));
        }
    }
}
Also used : IPadGrid(de.mossgrabers.framework.controller.grid.IPadGrid) ColorEx(de.mossgrabers.framework.controller.color.ColorEx) GridStep(de.mossgrabers.framework.daw.data.GridStep) IStepInfo(de.mossgrabers.framework.daw.IStepInfo) INoteClip(de.mossgrabers.framework.daw.INoteClip)

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