Search in sources :

Example 11 with IEnumSetting

use of de.mossgrabers.framework.configuration.IEnumSetting in project DrivenByMoss by git-moss.

the class SLConfiguration method init.

/**
 * {@inheritDoc}
 */
@Override
public void init(final ISettingsUI globalSettings, final ISettingsUI documentSettings) {
    // /////////////////////////
    // Play and Sequence
    final IEnumSetting touchpadModeSetting = globalSettings.getEnumSetting("Mode", "Touchpad", TOUCHPAD_OPTIONS, TOUCHPAD_OPTIONS[1]);
    touchpadModeSetting.addValueObserver(value -> {
        this.touchpadMode = value;
        this.notifyObservers(TOUCHPAD_MODE);
    });
    this.isSettingActive.add(TOUCHPAD_MODE);
    // /////////////////////////
    // Workflow
    this.activateExcludeDeactivatedItemsSetting(globalSettings);
    this.activateBehaviourOnStopSetting(globalSettings);
    this.activateNewClipLengthSetting(globalSettings);
    final IEnumSetting drumpadsAsModeSelectionSetting = globalSettings.getEnumSetting("Use drum pads for mode selection", CATEGORY_WORKFLOW, ON_OFF_OPTIONS, ON_OFF_OPTIONS[0]);
    drumpadsAsModeSelectionSetting.addValueObserver(value -> {
        this.drumpadsAsModeSelection = ON_OFF_OPTIONS[1].equals(value);
        this.notifyObservers(DRUMPADS_AS_MODE_SELECTION);
    });
    this.isSettingActive.add(DRUMPADS_AS_MODE_SELECTION);
}
Also used : IEnumSetting(de.mossgrabers.framework.configuration.IEnumSetting)

Example 12 with IEnumSetting

use of de.mossgrabers.framework.configuration.IEnumSetting in project DrivenByMoss by git-moss.

the class SLMkIIIConfiguration method init.

/**
 * {@inheritDoc}
 */
@Override
public void init(final ISettingsUI globalSettings, final ISettingsUI documentSettings) {
    // /////////////////////////
    // Scale for light guide
    this.activateScaleBaseSetting(documentSettings);
    this.activateScaleSetting(documentSettings);
    this.activateScaleInScaleSetting(documentSettings);
    // /////////////////////////
    // Workflow
    this.activateExcludeDeactivatedItemsSetting(globalSettings);
    this.activateBehaviourOnStopSetting(globalSettings);
    this.activateNewClipLengthSetting(globalSettings);
    this.activateKnobSpeedSetting(globalSettings);
    final IEnumSetting enableFadersSetting = globalSettings.getEnumSetting("Enable Faders", CATEGORY_WORKFLOW, ON_OFF_OPTIONS, ON_OFF_OPTIONS[1]);
    enableFadersSetting.addValueObserver(value -> {
        this.enableFaders = "On".equals(value);
        this.notifyObservers(ENABLE_FADERS);
    });
    this.isSettingActive.add(ENABLE_FADERS);
    final IEnumSetting enableLightguideSetting = globalSettings.getEnumSetting("Enable Lightguide", CATEGORY_WORKFLOW, ON_OFF_OPTIONS, ON_OFF_OPTIONS[1]);
    enableLightguideSetting.addValueObserver(value -> {
        this.enableLightguide = "On".equals(value);
        this.notifyObservers(ENABLE_LIGHTGUIDE);
    });
    this.isSettingActive.add(ENABLE_LIGHTGUIDE);
    this.activateUserPageNamesSetting(globalSettings);
    // /////////////////////////
    // Session
    this.activateSelectClipOnLaunchSetting(globalSettings);
    this.activateDrawRecordStripeSetting(globalSettings);
    this.activateActionForRecArmedPad(globalSettings);
}
Also used : IEnumSetting(de.mossgrabers.framework.configuration.IEnumSetting)

Example 13 with IEnumSetting

use of de.mossgrabers.framework.configuration.IEnumSetting in project DrivenByMoss by git-moss.

the class MCUConfiguration method activateAssignableSettings.

private void activateAssignableSettings(final ISettingsUI settingsUI) {
    for (int i = 0; i < this.assignableFunctions.length; i++) {
        final int pos = i;
        final IEnumSetting assignableSetting = settingsUI.getEnumSetting(ASSIGNABLE_BUTTON_NAMES[i], CATEGORY_ASSIGNABLE_BUTTONS, ASSIGNABLE_VALUES, ASSIGNABLE_VALUES[6]);
        assignableSetting.addValueObserver(value -> this.assignableFunctions[pos] = lookupIndex(ASSIGNABLE_VALUES, value));
        final IActionSetting actionSetting = settingsUI.getActionSetting(ASSIGNABLE_BUTTON_NAMES[i] + " - Action", CATEGORY_ASSIGNABLE_BUTTONS);
        actionSetting.addValueObserver(value -> this.assignableFunctionActions[pos] = actionSetting.get());
    }
}
Also used : IActionSetting(de.mossgrabers.framework.configuration.IActionSetting) IEnumSetting(de.mossgrabers.framework.configuration.IEnumSetting)

Example 14 with IEnumSetting

use of de.mossgrabers.framework.configuration.IEnumSetting in project DrivenByMoss by git-moss.

the class OSCConfiguration method init.

/**
 * {@inheritDoc}
 */
@Override
public void init(final ISettingsUI settingsUI) {
    // /////////////////////////
    // Network
    final IIntegerSetting receivePortSetting = settingsUI.getRangeSetting("Port", "Receive from (Script restart required)", 0, 65535, 1, "", 8000);
    receivePortSetting.addValueObserver(value -> {
        this.receivePort = value.intValue();
        this.notifyObservers(OSCConfiguration.RECEIVE_PORT);
    });
    final IStringSetting sendHostSetting = settingsUI.getStringSetting("Host", "Send to", 15, DEFAULT_SERVER);
    sendHostSetting.addValueObserver(value -> {
        this.sendHost = value;
        this.notifyObservers(OSCConfiguration.SEND_HOST);
    });
    final IIntegerSetting sendPortSetting = settingsUI.getRangeSetting("Port", "Send to", 0, 65535, 1, "", 9000);
    sendPortSetting.addValueObserver(value -> {
        this.sendPort = value.intValue();
        this.notifyObservers(SEND_PORT);
    });
    // /////////////////////////
    // Accent
    this.activateAccentActiveSetting(settingsUI);
    this.activateAccentValueSetting(settingsUI);
    // /////////////////////////
    // Workflow
    this.activateEnableVUMetersSetting(settingsUI);
    // /////////////////////////
    // Debug
    final IEnumSetting debugCommandsSetting = settingsUI.getEnumSetting("Debug commands", "Debug", ON_OFF_OPTIONS, ON_OFF_OPTIONS[0]);
    debugCommandsSetting.addValueObserver(value -> {
        this.debugCommands = "On".equals(value);
        this.notifyObservers(DEBUG_COMMANDS);
    });
}
Also used : IStringSetting(de.mossgrabers.framework.configuration.IStringSetting) IIntegerSetting(de.mossgrabers.framework.configuration.IIntegerSetting) IEnumSetting(de.mossgrabers.framework.configuration.IEnumSetting)

Example 15 with IEnumSetting

use of de.mossgrabers.framework.configuration.IEnumSetting in project DrivenByMoss by git-moss.

the class FireConfiguration method init.

/**
 * {@inheritDoc}
 */
@Override
public void init(final ISettingsUI globalSettings, final ISettingsUI documentSettings) {
    // /////////////////////////
    // Scale
    this.activateScaleSetting(documentSettings);
    this.activateScaleBaseSetting(documentSettings);
    this.activateScaleInScaleSetting(documentSettings);
    this.activateScaleLayoutSetting(documentSettings);
    // /////////////////////////
    // Note Repeat
    this.activateNoteRepeatSetting(documentSettings);
    // /////////////////////////
    // Session
    this.activateSelectClipOnLaunchSetting(globalSettings);
    this.activateDrawRecordStripeSetting(globalSettings);
    this.activateActionForRecArmedPad(globalSettings);
    // /////////////////////////
    // Transport
    this.activateBehaviourOnStopSetting(globalSettings);
    // Corrected label (removed automation)
    final IEnumSetting flipRecordSetting = globalSettings.getEnumSetting("Flip arranger and clip record", CATEGORY_TRANSPORT, ON_OFF_OPTIONS, ON_OFF_OPTIONS[0]);
    flipRecordSetting.addValueObserver(value -> {
        this.flipRecord = "On".equals(value);
        this.notifyObservers(FLIP_RECORD);
    });
    this.isSettingActive.add(FLIP_RECORD);
    // /////////////////////////
    // Play and Sequence
    this.activateAccentActiveSetting(globalSettings);
    this.activateAccentValueSetting(globalSettings);
    this.activateQuantizeAmountSetting(globalSettings);
    this.activateMidiEditChannelSetting(documentSettings);
    if (this.host.supports(Capability.HAS_DRUM_DEVICE))
        this.activateTurnOffEmptyDrumPadsSetting(globalSettings);
    // /////////////////////////
    // Workflow
    this.activateExcludeDeactivatedItemsSetting(globalSettings);
    this.activateNewClipLengthSetting(globalSettings);
    this.activateKnobSpeedSetting(globalSettings);
    // /////////////////////////
    // Hardware
    final IIntegerSetting padBrightnessSetting = globalSettings.getRangeSetting("Pad Brightness", CATEGORY_HARDWARE_SETUP, 0, 100, 1, "%", 100);
    padBrightnessSetting.addValueObserver(value -> {
        this.padBrightness = value.intValue();
        this.notifyObservers(PAD_BRIGHTNESS);
    });
    this.isSettingActive.add(PAD_BRIGHTNESS);
    final IIntegerSetting padSaturationSetting = globalSettings.getRangeSetting("Pad Saturation", CATEGORY_HARDWARE_SETUP, 0, 100, 1, "%", 100);
    padSaturationSetting.addValueObserver(value -> {
        this.padSaturation = value.intValue();
        this.notifyObservers(PAD_SATURATION);
    });
    this.isSettingActive.add(PAD_SATURATION);
}
Also used : IIntegerSetting(de.mossgrabers.framework.configuration.IIntegerSetting) IEnumSetting(de.mossgrabers.framework.configuration.IEnumSetting)

Aggregations

IEnumSetting (de.mossgrabers.framework.configuration.IEnumSetting)26 IIntegerSetting (de.mossgrabers.framework.configuration.IIntegerSetting)4 IActionSetting (de.mossgrabers.framework.configuration.IActionSetting)3 IStringSetting (de.mossgrabers.framework.configuration.IStringSetting)3 CommandCategory (de.mossgrabers.controller.generic.controller.CommandCategory)1 GenericFlexiControlSurface (de.mossgrabers.controller.generic.controller.GenericFlexiControlSurface)1 CommandSlot (de.mossgrabers.controller.generic.flexihandler.utils.CommandSlot)1 ProgramBank (de.mossgrabers.controller.generic.flexihandler.utils.ProgramBank)1 DAWColor (de.mossgrabers.framework.daw.DAWColor)1 IMidiOutput (de.mossgrabers.framework.daw.midi.IMidiOutput)1 FileEx (de.mossgrabers.framework.utils.FileEx)1 IOException (java.io.IOException)1 ParseException (java.text.ParseException)1