Browse Source

Add randomization to Quantizer.

tags/v1.2.0
Andrew Belt 3 years ago
parent
commit
98c392c6d1
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/Quantizer.cpp

+ 7
- 0
src/Quantizer.cpp View File

@@ -34,6 +34,13 @@ struct Quantizer : Module {
updateRanges();
}

void onRandomize() override {
for (int i = 0; i < 12; i++) {
enabledNotes[i] = (random::uniform() < 0.5f);
}
updateRanges();
}

void process(const ProcessArgs &args) override {
bool playingNotes[12] = {};
int channels = std::max(inputs[PITCH_INPUT].getChannels(), 1);


Loading…
Cancel
Save