30 using Integer::Integer;
32 void readCurrentValue()
override { this->setValue(soundEditor.currentSound->unisonDetune); }
34 void writeCurrentValue()
override {
35 int32_t current_value = this->getValue();
38 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
40 Kit* kit = getCurrentKit();
42 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
43 if (thisDrum->type == DrumType::SOUND) {
44 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
46 char modelStackMemoryForSoundDrum[MODEL_STACK_MAX_SIZE];
48 getModelStackFromSoundDrum(modelStackMemoryForSoundDrum, soundDrum)->addSoundFlags();
50 soundDrum->setUnisonDetune(current_value, modelStackForSoundDrum);
56 char modelStackMemory[MODEL_STACK_MAX_SIZE];
59 soundEditor.currentSound->setUnisonDetune(current_value, modelStack);
62 [[nodiscard]] int32_t getMaxValue()
const override {
return kMaxUnisonDetune; }