|
|
@@ -220,7 +220,7 @@ struct Rampage : Module { |
|
|
|
for (int c = 0; c < channels[part]; c += 4) { |
|
|
|
|
|
|
|
// process SchmittTriggers |
|
|
|
float_4 trig_mask = trigger_4[part][c / 4].process(in_trig[c / 4] / 2.0); |
|
|
|
float_4 trig_mask = trigger_4[part][c / 4].process(in_trig[c / 4] / 2.0, 0.1, 2.0); |
|
|
|
gate[part][c / 4] = ifelse(trig_mask, float_4::mask(), gate[part][c / 4]); |
|
|
|
in[c / 4] = ifelse(gate[part][c / 4], 10.0f, in[c / 4]); |
|
|
|
|
|
|
@@ -240,8 +240,9 @@ struct Rampage : Module { |
|
|
|
float shape = params[SHAPE_A_PARAM + part].getValue(); |
|
|
|
out[part][c / 4] += shapeDelta(delta, rate, shape) * args.sampleTime; |
|
|
|
|
|
|
|
float_4 rising = (in[c / 4] - out[part][c / 4]) > 1e-3f; |
|
|
|
float_4 falling = (in[c / 4] - out[part][c / 4]) < -1e-3f; |
|
|
|
float_4 rising = simd::ifelse(delta_gt_0, (in[c / 4] - out[part][c / 4]) > 1e-3f, float_4::zero()); |
|
|
|
float_4 falling = simd::ifelse(delta_lt_0, (in[c / 4] - out[part][c / 4]) < -1e-3f, float_4::zero()); |
|
|
|
|
|
|
|
float_4 end_of_cycle = simd::andnot(falling, delta_lt_0); |
|
|
|
|
|
|
|
endOfCyclePulse[part][c / 4].trigger(end_of_cycle, 1e-3); |
|
|
|