Browse Source

STMix: apply exponential mapping to the gain

tags/v2.1.0
hemmer 3 years ago
parent
commit
c47e8eb6e0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/STMix.cpp

+ 2
- 2
src/STMix.cpp View File

@@ -48,12 +48,12 @@ struct STMix : Module {

for (int i = 0; i < numMixerChannels + 1; ++i) {

const float gain = (i < numMixerChannels) ? exponentialBipolar80Pade_5_4(params[GAIN_PARAM + i].getValue()) : 1.f;

for (int c = 0; c < numActivePolyphonyEngines; c += 4) {
const float_4 in_left = inputs[LEFT_INPUT + i].getNormalPolyVoltageSimd<float_4>(0.f, c);
const float_4 in_right = inputs[RIGHT_INPUT + i].getNormalPolyVoltageSimd<float_4>(in_left, c);

const float gain = (i < numMixerChannels) ? params[GAIN_PARAM + i].getValue() : 1.f;

out_left[c / 4] += in_left * gain;
out_right[c / 4] += in_right * gain;
}


Loading…
Cancel
Save