Browse Source

Random: Disable RND slider light if IN is connected.

tags/v2.5.0
Andrew Belt 1 year ago
parent
commit
efc7cf5e6f
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      src/Random.cpp

+ 6
- 3
src/Random.cpp View File

@@ -94,9 +94,12 @@ struct Random : Module {
shape += inputs[SHAPE_INPUT].getVoltage() / 10.f * params[SHAPE_CV_PARAM].getValue(); shape += inputs[SHAPE_INPUT].getVoltage() / 10.f * params[SHAPE_CV_PARAM].getValue();
shape = clamp(shape, 0.f, 1.f); shape = clamp(shape, 0.f, 1.f);


float rand = params[RAND_PARAM].getValue();
rand += inputs[RAND_INPUT].getVoltage() / 10.f * params[RAND_CV_PARAM].getValue();
rand = clamp(rand, 0.f, 1.f);
float rand = 0.f;
if (!inputs[EXTERNAL_INPUT].isConnected()) {
rand = params[RAND_PARAM].getValue();
rand += inputs[RAND_INPUT].getVoltage() / 10.f * params[RAND_CV_PARAM].getValue();
rand = clamp(rand, 0.f, 1.f);
}


bool uni = params[OFFSET_PARAM].getValue() > 0.f; bool uni = params[OFFSET_PARAM].getValue() > 0.f;




Loading…
Cancel
Save