Browse Source

Random: Fix smooth output discontinuity due to incorrect interpolation scaling.

v2
Andrew Belt 3 days ago
parent
commit
d12b22a170
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/Random.cpp

+ 2
- 1
src/Random.cpp View File

@@ -207,9 +207,10 @@ struct Random : Module {
if (p < 1e6f) {
v = std::fmin(phase * p, 1.f);
v = std::cos(M_PI * v);
v = (1.f - v) / 2.f;
}
else {
v = -1.f;
v = 1.f;
}
interpolateOutput(outputs[SMOOTH_OUTPUT], v);
}


Loading…
Cancel
Save