32 using Selection::Selection;
33 void readCurrentValue()
override { this->setValue(soundEditor.currentArpSettings->mode); }
36 void writeCurrentValue()
override {
37 auto current_value = this->getValue<ArpMode>();
40 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
42 Kit* kit = getCurrentKit();
45 if (soundEditor.currentArpSettings->mode == ArpMode::OFF || current_value == ArpMode::OFF) {
46 if (getCurrentClip()->isActiveOnOutput() && !soundEditor.editingKitAffectEntire()) {
51 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
52 thisDrum->arpSettings.mode = current_value;
53 thisDrum->arpSettings.updatePresetFromCurrentSettings();
59 if (soundEditor.currentArpSettings->mode == ArpMode::OFF || current_value == ArpMode::OFF) {
60 if (getCurrentClip()->isActiveOnOutput() && !soundEditor.editingKitAffectEntire()) {
61 char modelStackMemory[MODEL_STACK_MAX_SIZE];
64 if (soundEditor.editingKit()) {
66 Drum* currentDrum = ((
Kit*)getCurrentClip()->output)->selectedDrum;
67 if (currentDrum !=
nullptr) {
68 currentDrum->killAllVoices();
71 else if (soundEditor.editingCVOrMIDIClip()) {
72 getCurrentInstrumentClip()->stopAllNotesForMIDIOrCV(modelStack->toWithTimelineCounter());
75 ModelStackWithSoundFlags* modelStackWithSoundFlags = modelStack->addSoundFlags();
76 soundEditor.currentSound->allNotesOff(
77 modelStackWithSoundFlags,
78 soundEditor.currentSound
80 soundEditor.currentSound->reassessRenderSkippingStatus(modelStackWithSoundFlags);
85 soundEditor.currentArpSettings->mode = current_value;
86 soundEditor.currentArpSettings->updatePresetFromCurrentSettings();
90 deluge::vector<std::string_view> getOptions(OptType optType)
override {
92 using enum l10n::String;
94 l10n::getView(STRING_FOR_OFF),
95 l10n::getView(STRING_FOR_ON),
100 bool isToggle()
override {
return true; }
Definition model_stack.h:231