32 using Integer::Integer;
34 void readCurrentValue()
override { this->setValue(soundEditor.currentSound->numUnison); }
36 void writeCurrentValue()
override {
37 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);
48 char modelStackMemoryForSoundDrum[MODEL_STACK_MAX_SIZE];
50 getModelStackFromSoundDrum(modelStackMemoryForSoundDrum, soundDrum)->addSoundFlags();
52 soundDrum->setNumUnison(current_value, modelStackForSoundDrum);
58 char modelStackMemory[MODEL_STACK_MAX_SIZE];
61 soundEditor.currentSound->setNumUnison(current_value, modelStack);
64 [[nodiscard]] int32_t getMinValue()
const override {
return 1; }
65 [[nodiscard]] int32_t getMaxValue()
const override {
return kMaxNumVoicesUnison; }
68 buf.append(l10n::getView(l10n::String::STRING_FOR_UNISON_NUMBER_SHORT));