Search in sources :

Example 21 with ColorManager

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

the class SessionView method getButtonColor.

/**
 * {@inheritDoc}
 */
@Override
public int getButtonColor(final ButtonID buttonID) {
    final ISceneBank sceneBank = this.model.getSceneBank();
    final ColorManager colorManager = this.model.getColorManager();
    if (buttonID == ButtonID.ARROW_UP || buttonID == ButtonID.ARROW_DOWN) {
        final boolean isOn = buttonID == ButtonID.ARROW_UP ? sceneBank.canScrollPageBackwards() : sceneBank.canScrollPageForwards();
        return isOn ? LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_GREEN : LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_GREY_LO;
    }
    if (!ButtonID.isSceneButton(buttonID))
        return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_BLACK;
    if (buttonID == ButtonID.SCENE1)
        return colorManager.getColorIndex(getSceneColor(sceneBank.getItem(0)));
    if (this.padMode == null)
        return colorManager.getColorIndex(getSceneColor(sceneBank.getItem(1)));
    switch(this.padMode) {
        case REC_ARM:
            return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_RED_HI;
        case TRACK_SELECT:
            return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_WHITE;
        case MUTE:
            return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_AMBER_HI;
        case SOLO:
            return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_YELLOW_HI;
        case STOP_CLIP:
            return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_ROSE;
        default:
            return LaunchkeyMk3ColorManager.LAUNCHKEY_COLOR_BLACK;
    }
}
Also used : ISceneBank(de.mossgrabers.framework.daw.data.bank.ISceneBank) LaunchkeyMk3ColorManager(de.mossgrabers.controller.novation.launchkey.maxi.controller.LaunchkeyMk3ColorManager) 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