30 using Selection::Selection;
31 void readCurrentValue()
override { this->setValue(soundEditor.currentSound->modulator1ToModulator0); }
33 void writeCurrentValue()
override {
34 int32_t current_value = this->getValue();
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) {
42 if (thisDrum->type == DrumType::SOUND) {
43 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
46 if (soundDrum->synthMode == SynthMode::FM) {
47 soundDrum->modulator1ToModulator0 = current_value;
54 soundEditor.currentSound->modulator1ToModulator0 = current_value;
57 deluge::vector<std::string_view> getOptions(OptType optType)
override {
59 using enum l10n::String;
60 static auto mod1 = l10n::getView(STRING_FOR_MODULATOR_1);
62 l10n::getView(STRING_FOR_CARRIERS),
67 Sound* sound =
static_cast<Sound*
>(modControllable);
68 return (whichThing == 1 && sound->synthMode == SynthMode::FM);