30 using Integer::Integer;
32 this->setValue(getLookupIndexFromValue(soundEditor.currentSidechain->release >> 3, releaseRateTable, 50));
35 void writeCurrentValue()
override {
36 int32_t current_value = releaseRateTable[this->getValue()] << 3;
39 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
41 Kit* kit = getCurrentKit();
43 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
44 if (thisDrum->type == DrumType::SOUND) {
45 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
47 soundDrum->sidechain.release = current_value;
53 soundEditor.currentSidechain->release = current_value;
56 AudioEngine::mustUpdateReverbParamsBeforeNextRender =
true;
58 [[nodiscard]] int32_t getMaxValue()
const override {
return 50; }
60 return !soundEditor.editingReverbSidechain() || AudioEngine::reverbSidechainVolume >= 0;