30 using Selection::Selection;
31 void readCurrentValue()
override { this->setValue(soundEditor.currentSound->synthMode); }
33 void writeCurrentValue()
override {
34 auto current_value = this->getValue<::SynthMode>();
37 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
39 Kit* kit = getCurrentKit();
41 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->sources[0].oscType <= kLastRingmoddableOscType
47 && soundDrum->sources[1].oscType <= kLastRingmoddableOscType) {
48 soundDrum->setSynthMode(current_value, currentSong);
55 soundEditor.currentSound->setSynthMode(current_value, currentSong);
57 view.setKnobIndicatorLevels();
60 deluge::vector<std::string_view> getOptions(OptType optType)
override {
63 l10n::getView(l10n::String::STRING_FOR_SUBTRACTIVE),
64 l10n::getView(l10n::String::STRING_FOR_FM),
65 l10n::getView(l10n::String::STRING_FOR_RINGMOD),
70 Sound* sound =
static_cast<Sound*
>(modControllable);
71 return (sound->sources[0].oscType <= kLastRingmoddableOscType
72 && sound->sources[1].oscType <= kLastRingmoddableOscType);