31 using Integer::Integer;
32 [[nodiscard]] int32_t getMinValue()
const override {
return 0; }
33 [[nodiscard]] int32_t getMaxValue()
const override {
return kMaxMIDIValue; }
35 return soundEditor.editingKitRow() && !soundEditor.editingNonAudioDrumRow();
38 int32_t value = soundEditor.currentSound->outputMidiNoteForDrum;
39 if (value == MIDI_NOTE_NONE) {
42 this->setValue(value);
45 void writeCurrentValue()
override {
46 int32_t value = this->getValue();
48 if (currentUIMode == UI_MODE_HOLDING_AFFECT_ENTIRE_IN_SOUND_EDITOR && soundEditor.editingKitRow()) {
50 Kit* kit = getCurrentKit();
52 for (
Drum* thisDrum = kit->firstDrum; thisDrum !=
nullptr; thisDrum = thisDrum->next) {
53 if (thisDrum->type == DrumType::SOUND) {
54 auto* soundDrum =
static_cast<SoundDrum*
>(thisDrum);
55 soundDrum->outputMidiNoteForDrum = value;
61 soundEditor.currentSound->outputMidiNoteForDrum = value;