30 Sync(deluge::l10n::String name, deluge::l10n::String type, uint8_t lfoId) :
SyncLevel(name, type), lfoId_(lfoId) {}
33 this->setValue(syncTypeAndLevelToMenuOption(soundEditor.currentSound->lfoConfig[lfoId_].syncType,
34 soundEditor.currentSound->lfoConfig[lfoId_].syncLevel));
37 void writeCurrentValue()
override {
38 int32_t current_value = this->getValue();
40 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
42 Kit* kit = getCurrentKit();
44 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
45 if (thisDrum->type == DrumType::SOUND) {
46 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
47 soundDrum->lfoConfig[lfoId_].syncType = syncValueToSyncType(current_value);
48 soundDrum->lfoConfig[lfoId_].syncLevel = syncValueToSyncLevel(current_value);
52 soundDrum->resyncGlobalLFOs();
53 soundDrum->setupPatchingForAllParamManagers(currentSong);
59 soundEditor.currentSound->lfoConfig[lfoId_].syncType = syncValueToSyncType(current_value);
60 soundEditor.currentSound->lfoConfig[lfoId_].syncLevel = syncValueToSyncLevel(current_value);
64 soundEditor.currentSound->resyncGlobalLFOs();
65 soundEditor.currentSound->setupPatchingForAllParamManagers(currentSong);