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);
}
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);
}
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());
}
}
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);
});
}
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);
}
Aggregations