18#include "definitions_cxx.hpp"
20#include "gui/ui/sound_editor.h"
21#include "randomizer_integer.h"
23namespace deluge::gui::menu_item::randomizer::midi_cv {
26 using RandomizerNonSoundInteger::RandomizerNonSoundInteger;
28 this->setValue(computeCurrentValueForUnsignedMenuItem(soundEditor.currentArpSettings->swapProbability));
30 void writeCurrentValue()
override {
31 int32_t value = computeFinalValueForUnsignedMenuItem(this->getValue());
32 soundEditor.currentArpSettings->swapProbability = value;
35 return (soundEditor.editingCVOrMIDIClip() || soundEditor.editingMidiDrumRow())
36 && soundEditor.currentArpSettings->mode != ArpMode::OFF;
38 [[nodiscard]] NumberStyle getNumberStyle()
const override {
return PERCENT; }
Definition mod_controllable_audio.h:47
Definition randomizer_integer.h:22
Definition swap_probability.h:24
void readCurrentValue() override
Like readValueAgain, but does not redraw.
Definition swap_probability.h:27
bool isRelevant(ModControllableAudio *modControllable, int32_t whichThing) override
Check if this MenuItem should show up in a containing deluge::gui::menu_item::Submenu.
Definition swap_probability.h:34