| 3 | using simd::float_4; |
| 4 | |
| 5 | static float gainFunction(float x, float shape) { |
| 6 | float lin = x; |
| 7 | if (shape > 0.f) { |
| 8 | float log = 11.f * x / (10.f * x + 1.f); |
| 9 | return crossfade(lin, log, shape); |
| 10 | } |
| 11 | else { |
| 12 | float exp = std::pow(x, 4); |
| 13 | return crossfade(lin, exp, -shape); |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | struct HexmixVCA : Module { |
| 18 | enum ParamIds { |