30 using Selection::Selection;
31 void readCurrentValue()
override { this->setValue<::FilterRoute>(soundEditor.currentModControllable->filterRoute); }
34 void writeCurrentValue()
override {
35 auto current_value = this->getValue<::FilterRoute>();
38 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
40 Kit* kit = getCurrentKit();
42 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
43 if (thisDrum->type == DrumType::SOUND) {
44 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
46 if (soundDrum->lpfMode != FilterMode::OFF && soundDrum->hpfMode != FilterMode::OFF) {
47 soundDrum->filterRoute = current_value;
54 soundEditor.currentModControllable->filterRoute = current_value;
58 deluge::vector<std::string_view> getOptions(OptType optType)
override {
60 return {
"HPF2LPF",
"LPF2HPF", l10n::getView(l10n::String::STRING_FOR_PARALLEL)};
63 Sound* sound =
static_cast<Sound*
>(modControllable);
64 return ((sound ==
nullptr) || (sound->lpfMode != FilterMode::OFF && sound->hpfMode != FilterMode::OFF));