Search in sources :

Example 1 with ColorManager

use of de.mossgrabers.framework.controller.color.ColorManager in project DrivenByMoss by git-moss.

the class SendsView method drawGrid.

/**
 * {@inheritDoc}
 */
@Override
public void drawGrid() {
    final ColorManager cm = this.model.getColorManager();
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final IMidiOutput output = this.surface.getOutput();
    for (int i = 0; i < 8; i++) {
        final ITrack track = tb.getTrack(i);
        final ISend send = track.getSend(this.selectedSend);
        final int color = cm.getColor(BitwigColors.getColorIndex(track.getColor()));
        if (this.trackColors[i] != color || !track.doesExist() || send.getName().isEmpty())
            this.setupFader(i);
        this.trackColors[i] = color;
        output.sendCC(LaunchpadControlSurface.LAUNCHPAD_FADER_1 + i, send.getValue());
    }
}
Also used : IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) ISend(de.mossgrabers.framework.daw.data.ISend) ColorManager(de.mossgrabers.framework.controller.color.ColorManager)

Example 2 with ColorManager

use of de.mossgrabers.framework.controller.color.ColorManager in project DrivenByMoss by git-moss.

the class VolumeView method updateSceneButtons.

/**
 * {@inheritDoc}
 */
@Override
public void updateSceneButtons() {
    final ColorManager cm = this.model.getColorManager();
    final IMasterTrack track = this.model.getMasterTrack();
    final int sceneMax = 9 * track.getVolume() / this.model.getValueChanger().getUpperBound();
    for (int i = 0; i < 8; i++) {
        final int color = cm.getColor(BitwigColors.getColorIndex(track.getColor()));
        this.surface.setButton(LaunchpadControlSurface.LAUNCHPAD_BUTTON_SCENE8 + 10 * i, i < sceneMax ? color : LaunchpadColors.LAUNCHPAD_COLOR_BLACK);
    }
}
Also used : ColorManager(de.mossgrabers.framework.controller.color.ColorManager) IMasterTrack(de.mossgrabers.framework.daw.data.IMasterTrack)

Example 3 with ColorManager

use of de.mossgrabers.framework.controller.color.ColorManager in project DrivenByMoss by git-moss.

the class VolumeView method drawGrid.

/**
 * {@inheritDoc}
 */
@Override
public void drawGrid() {
    final ColorManager cm = this.model.getColorManager();
    final IChannelBank tb = this.model.getCurrentTrackBank();
    final IMidiOutput output = this.surface.getOutput();
    for (int i = 0; i < 8; i++) {
        final ITrack track = tb.getTrack(i);
        final int color = cm.getColor(BitwigColors.getColorIndex(track.getColor()));
        if (this.trackColors[i] != color || !track.doesExist())
            this.setupFader(i);
        this.trackColors[i] = color;
        output.sendCC(LaunchpadControlSurface.LAUNCHPAD_FADER_1 + i, track.getVolume());
    }
}
Also used : IMidiOutput(de.mossgrabers.framework.daw.midi.IMidiOutput) ITrack(de.mossgrabers.framework.daw.data.ITrack) IChannelBank(de.mossgrabers.framework.daw.IChannelBank) ColorManager(de.mossgrabers.framework.controller.color.ColorManager)

Example 4 with ColorManager

use of de.mossgrabers.framework.controller.color.ColorManager in project DrivenByMoss by git-moss.

the class NoteViewSelectMode method updateFirstRow.

/**
 * {@inheritDoc}
 */
@Override
public void updateFirstRow() {
    final ColorManager colorManager = this.model.getColorManager();
    final ViewManager viewManager = this.surface.getViewManager();
    for (int i = 0; i < 8; i++) this.surface.updateButton(20 + i, colorManager.getColor(VIEWS[i] == null ? AbstractMode.BUTTON_COLOR_OFF : viewManager.isActiveView(VIEWS[i]) ? AbstractMode.BUTTON_COLOR_HI : AbstractMode.BUTTON_COLOR_ON));
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) ColorManager(de.mossgrabers.framework.controller.color.ColorManager)

Example 5 with ColorManager

use of de.mossgrabers.framework.controller.color.ColorManager in project DrivenByMoss by git-moss.

the class NoteViewSelectMode method updateSecondRow.

/**
 * {@inheritDoc}
 */
@Override
public void updateSecondRow() {
    final ColorManager colorManager = this.model.getColorManager();
    final ViewManager viewManager = this.surface.getViewManager();
    for (int i = 0; i < 8; i++) this.surface.updateButton(102 + i, colorManager.getColor(VIEWS_TOP[i] == null ? AbstractMode.BUTTON_COLOR_OFF : viewManager.isActiveView(VIEWS_TOP[i]) ? AbstractMode.BUTTON_COLOR_HI : AbstractMode.BUTTON_COLOR_ON));
}
Also used : ViewManager(de.mossgrabers.framework.view.ViewManager) ColorManager(de.mossgrabers.framework.controller.color.ColorManager)

Aggregations

ColorManager (de.mossgrabers.framework.controller.color.ColorManager)21 ITrack (de.mossgrabers.framework.daw.data.ITrack)5 IChannelBank (de.mossgrabers.framework.daw.IChannelBank)3 IMidiOutput (de.mossgrabers.framework.daw.midi.IMidiOutput)3 ViewManager (de.mossgrabers.framework.view.ViewManager)3 IMasterTrack (de.mossgrabers.framework.daw.data.IMasterTrack)2 IScene (de.mossgrabers.framework.daw.data.IScene)2 ISceneBank (de.mossgrabers.framework.daw.data.bank.ISceneBank)2 OscAddressSpace (com.bitwig.extension.api.opensoundcontrol.OscAddressSpace)1 OscModule (com.bitwig.extension.api.opensoundcontrol.OscModule)1 ControllerHost (com.bitwig.extension.controller.api.ControllerHost)1 PushColorManager (de.mossgrabers.controller.ableton.push.controller.PushColorManager)1 LaunchkeyMk3ColorManager (de.mossgrabers.controller.novation.launchkey.maxi.controller.LaunchkeyMk3ColorManager)1 LaunchkeyMiniMk3ColorManager (de.mossgrabers.controller.novation.launchkey.mini.controller.LaunchkeyMiniMk3ColorManager)1 SLMkIIIColorManager (de.mossgrabers.controller.novation.slmkiii.controller.SLMkIIIColorManager)1 SettingsUI (de.mossgrabers.framework.bitwig.configuration.SettingsUI)1 AbstractConfiguration (de.mossgrabers.framework.configuration.AbstractConfiguration)1 Configuration (de.mossgrabers.framework.configuration.Configuration)1 LightInfo (de.mossgrabers.framework.controller.grid.LightInfo)1 PadGrid (de.mossgrabers.framework.controller.grid.PadGrid)1