30 using Selection::Selection;
32 if (!soundEditor.allowsNoteTails) {
36 this->setValue(soundEditor.currentArpSettings->includeInKitArp);
40 void writeCurrentValue()
override {
41 auto current_value = this->getValue();
44 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
46 Kit* kit = getCurrentKit();
48 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
49 bool allowsNoteTails =
true;
50 if (thisDrum->type == DrumType::SOUND) {
51 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
53 char modelStackMemoryForSoundDrum[MODEL_STACK_MAX_SIZE];
55 getModelStackFromSoundDrum(modelStackMemoryForSoundDrum, soundDrum)->addSoundFlags();
56 allowsNoteTails = soundDrum->allowNoteTails(modelStackForSoundDrum,
true);
59 if (allowsNoteTails) {
60 thisDrum->arpSettings.includeInKitArp = current_value != 0;
66 if (soundEditor.allowsNoteTails) {
67 soundEditor.currentArpSettings->includeInKitArp = current_value != 0;
72 deluge::vector<std::string_view> getOptions(OptType optType)
override {
74 using enum l10n::String;
76 l10n::getView(STRING_FOR_OFF),
77 l10n::getView(STRING_FOR_ON),
82 return soundEditor.editingKitRow();
86 label.append(deluge::l10n::getView(deluge::l10n::built_in::seven_segment, this->name).data());
90 bool isToggle()
override {
return true; }