30 using SyncLevel::SyncLevel;
32 size_t size()
override {
return 10; };
34 this->setValue(syncTypeAndLevelToMenuOption(soundEditor.currentSidechain->syncType,
35 soundEditor.currentSidechain->syncLevel));
38 void writeCurrentValue()
override {
39 int32_t current_value = this->getValue();
42 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
44 Kit* kit = getCurrentKit();
46 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
47 if (thisDrum->type == DrumType::SOUND) {
48 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
50 soundDrum->sidechain.syncType = syncValueToSyncType(current_value);
51 soundDrum->sidechain.syncLevel = syncValueToSyncLevel(current_value);
57 soundEditor.currentSidechain->syncType = syncValueToSyncType(current_value);
58 soundEditor.currentSidechain->syncLevel = syncValueToSyncLevel(current_value);
61 AudioEngine::mustUpdateReverbParamsBeforeNextRender =
true;
64 return !soundEditor.editingReverbSidechain() || AudioEngine::reverbSidechainVolume >= 0;