use of de.mossgrabers.framework.configuration.IEnumSetting in project DrivenByMoss by git-moss.
the class MCUConfiguration method activateHardwareSettings.
private void activateHardwareSettings(final ISettingsUI settingsUI) {
final IEnumSetting profileSetting = settingsUI.getEnumSetting("Profile", CATEGORY_HARDWARE_SETUP, DEVICE_OPTIONS, DEVICE_OPTIONS[0]);
profileSetting.addValueObserver(value -> {
switch(value) {
case DEVICE_ICON_PLATFORM_M:
this.hasDisplay1Setting.set(ON_OFF_OPTIONS[0]);
this.hasDisplay2Setting.set(ON_OFF_OPTIONS[0]);
this.hasSegmentDisplaySetting.set(ON_OFF_OPTIONS[0]);
this.hasAssignmentDisplaySetting.set(ON_OFF_OPTIONS[0]);
this.hasMotorFadersSetting.set(ON_OFF_OPTIONS[1]);
this.displayTrackNamesSetting.set(ON_OFF_OPTIONS[0]);
this.useVertZoomForModesSetting.set(ON_OFF_OPTIONS[1]);
this.useFadersAsKnobsSetting.set(ON_OFF_OPTIONS[0]);
this.setVUMetersEnabled(false);
break;
case DEVICE_ICON_QCON_PRO_X:
this.hasDisplay1Setting.set(ON_OFF_OPTIONS[1]);
this.hasDisplay2Setting.set(ON_OFF_OPTIONS[1]);
this.hasSegmentDisplaySetting.set(ON_OFF_OPTIONS[1]);
this.hasAssignmentDisplaySetting.set(ON_OFF_OPTIONS[0]);
this.hasMotorFadersSetting.set(ON_OFF_OPTIONS[1]);
this.displayTrackNamesSetting.set(ON_OFF_OPTIONS[0]);
this.useVertZoomForModesSetting.set(ON_OFF_OPTIONS[0]);
this.useFadersAsKnobsSetting.set(ON_OFF_OPTIONS[0]);
this.setVUMetersEnabled(true);
break;
case DEVICE_MACKIE_MCU_PRO:
this.hasDisplay1Setting.set(ON_OFF_OPTIONS[1]);
this.hasDisplay2Setting.set(ON_OFF_OPTIONS[0]);
this.hasSegmentDisplaySetting.set(ON_OFF_OPTIONS[1]);
this.hasAssignmentDisplaySetting.set(ON_OFF_OPTIONS[1]);
this.hasMotorFadersSetting.set(ON_OFF_OPTIONS[1]);
this.displayTrackNamesSetting.set(ON_OFF_OPTIONS[1]);
this.useVertZoomForModesSetting.set(ON_OFF_OPTIONS[0]);
this.useFadersAsKnobsSetting.set(ON_OFF_OPTIONS[0]);
this.setVUMetersEnabled(true);
break;
case DEVICE_ZOOM_R16:
this.hasDisplay1Setting.set(ON_OFF_OPTIONS[0]);
this.hasDisplay2Setting.set(ON_OFF_OPTIONS[0]);
this.hasSegmentDisplaySetting.set(ON_OFF_OPTIONS[0]);
this.hasAssignmentDisplaySetting.set(ON_OFF_OPTIONS[0]);
this.hasMotorFadersSetting.set(ON_OFF_OPTIONS[0]);
this.displayTrackNamesSetting.set(ON_OFF_OPTIONS[0]);
this.useVertZoomForModesSetting.set(ON_OFF_OPTIONS[0]);
this.useFadersAsKnobsSetting.set(ON_OFF_OPTIONS[1]);
this.setVUMetersEnabled(false);
break;
}
profileSetting.set(DEVICE_SELECT);
});
this.hasDisplay1Setting = settingsUI.getEnumSetting("Has a display", CATEGORY_HARDWARE_SETUP, ON_OFF_OPTIONS, ON_OFF_OPTIONS[1]);
this.hasDisplay1Setting.addValueObserver(value -> {
this.hasDisplay1 = "On".equals(value);
this.notifyObservers(HAS_DISPLAY1);
});
this.hasDisplay2Setting = settingsUI.getEnumSetting("Has a second display", CATEGORY_HARDWARE_SETUP, ON_OFF_OPTIONS, ON_OFF_OPTIONS[1]);
this.hasDisplay2Setting.addValueObserver(value -> {
this.hasDisplay2 = "On".equals(value);
this.notifyObservers(HAS_DISPLAY2);
});
this.hasSegmentDisplaySetting = settingsUI.getEnumSetting("Has a position/tempo display", CATEGORY_HARDWARE_SETUP, ON_OFF_OPTIONS, ON_OFF_OPTIONS[1]);
this.hasSegmentDisplaySetting.addValueObserver(value -> {
this.hasSegmentDisplay = "On".equals(value);
this.notifyObservers(HAS_SEGMENT_DISPLAY);
});
this.hasAssignmentDisplaySetting = settingsUI.getEnumSetting("Has an assignment display", CATEGORY_HARDWARE_SETUP, ON_OFF_OPTIONS, ON_OFF_OPTIONS[1]);
this.hasAssignmentDisplaySetting.addValueObserver(value -> {
this.hasAssignmentDisplay = "On".equals(value);
this.notifyObservers(HAS_ASSIGNMENT_DISPLAY);
});
this.hasMotorFadersSetting = settingsUI.getEnumSetting("Has motor faders", CATEGORY_HARDWARE_SETUP, ON_OFF_OPTIONS, ON_OFF_OPTIONS[1]);
this.hasMotorFadersSetting.addValueObserver(value -> {
this.hasMotorFaders = "On".equals(value);
this.notifyObservers(HAS_MOTOR_FADERS);
});
this.displayTrackNamesSetting = settingsUI.getEnumSetting("Display track names in 1st display", CATEGORY_HARDWARE_SETUP, ON_OFF_OPTIONS, ON_OFF_OPTIONS[0]);
this.displayTrackNamesSetting.addValueObserver(value -> {
this.displayTrackNames = "On".equals(value);
this.notifyObservers(DISPLAY_TRACK_NAMES);
});
this.useVertZoomForModesSetting = settingsUI.getEnumSetting("Use vertical zoom to change tracks", CATEGORY_HARDWARE_SETUP, ON_OFF_OPTIONS, ON_OFF_OPTIONS[0]);
this.useVertZoomForModesSetting.addValueObserver(value -> {
this.useVertZoomForModes = "On".equals(value);
this.notifyObservers(USE_VERT_ZOOM_FOR_MODES);
});
this.useFadersAsKnobsSetting = settingsUI.getEnumSetting("Use faders like editing knobs", CATEGORY_HARDWARE_SETUP, ON_OFF_OPTIONS, ON_OFF_OPTIONS[0]);
this.useFadersAsKnobsSetting.addValueObserver(value -> {
this.useFadersAsKnobs = "On".equals(value);
this.notifyObservers(USE_FADERS_AS_KNOBS);
});
}
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 setting = settingsUI.getEnumSetting(ASSIGNABLE_BUTTON_NAMES[i], "Assignable buttons", ASSIGNABLE_VALUES, ASSIGNABLE_VALUES[6]);
setting.addValueObserver(value -> {
for (int f = 0; f < ASSIGNABLE_VALUES.length; f++) {
if (ASSIGNABLE_VALUES[f].equals(value))
this.assignableFunctions[pos] = f;
}
});
}
}
use of de.mossgrabers.framework.configuration.IEnumSetting in project DrivenByMoss by git-moss.
the class MCUConfiguration method activateChannelTouchSetting.
/**
* Activate the channel touch select setting.
*
* @param settingsUI The settings
*/
protected void activateChannelTouchSetting(final ISettingsUI settingsUI) {
final IEnumSetting touchChannelSetting = settingsUI.getEnumSetting("Select Channel on Fader Touch", CATEGORY_WORKFLOW, ON_OFF_OPTIONS, ON_OFF_OPTIONS[1]);
touchChannelSetting.addValueObserver(value -> {
this.touchChannel = "On".equals(value);
this.notifyObservers(TOUCH_CHANNEL);
});
}
use of de.mossgrabers.framework.configuration.IEnumSetting in project DrivenByMoss by git-moss.
the class PushConfiguration method activateDefaultNoteViewSetting.
/**
* Activate the default note view setting.
*
* @param settingsUI The settings
*/
private void activateDefaultNoteViewSetting(final ISettingsUI settingsUI) {
final String[] noteViewNames = Views.getNoteViewNames();
final IEnumSetting defaultNoteViewSetting = settingsUI.getEnumSetting("Default note view", CATEGORY_PLAY_AND_SEQUENCE, noteViewNames, noteViewNames[0]);
defaultNoteViewSetting.addValueObserver(value -> {
for (int i = 0; i < noteViewNames.length; i++) {
if (noteViewNames[i].equals(value))
this.defaultNoteView = Views.getNoteView(i);
}
this.notifyObservers(DEFAULT_NOTE_VIEW);
});
}
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 settingsUI) {
// /////////////////////////
// Play and Sequence
final IEnumSetting touchpadModeSetting = settingsUI.getEnumSetting("Mode", "Touchpad", TOUCHPAD_OPTIONS, TOUCHPAD_OPTIONS[1]);
touchpadModeSetting.addValueObserver(value -> {
this.touchpadMode = value;
this.notifyObservers(TOUCHPAD_MODE);
});
// /////////////////////////
// Workflow
this.activateDisplayCrossfaderSetting(settingsUI);
this.activateNewClipLengthSetting(settingsUI);
}
Aggregations