question on calling onRandomize()

void process(const ProcessArgs& args) override {
  // Trigger handling
  float trig = inputs[TRIG_INPUT].getVoltage();
  if (trig==0.25f) { onRandomize(); params[BASEPITCH_PARAM].setValue(52);}
// etc.

I see the BASEPITCH_PARAM knob moving but no general randomization. What do I miss? Is it the way to call onRandomize() in this block?

onRandomize() is an old (deprecated) method that doesn’t have any code in it anymore. onRandomize(const RandomizeEvent& e) is the method that contains the actual randomization code.

1 Like
void process(const ProcessArgs& args) override {
  // Trigger handling
  float trig = inputs[TRIG_INPUT].getVoltage();
  if (trig==0.25f) { 
	onRandomize({});
	params[BASEPITCH_PARAM].setValue(52);
  }
  //etc.

Thank you!

1 Like