Browse Source

Normalize input of Mutes to the input above it

tags/v0.5.0
Andrew Belt 7 years ago
parent
commit
a74b4e6dda
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/Mutes.cpp

+ 4
- 2
src/Mutes.cpp View File

@@ -67,11 +67,13 @@ struct Mutes : Module {
}; };


void Mutes::step() { void Mutes::step() {
float out = 0.0;
for (int i = 0; i < NUM_CHANNELS; i++) { for (int i = 0; i < NUM_CHANNELS; i++) {
if (muteTrigger[i].process(params[MUTE_PARAM + i].value)) if (muteTrigger[i].process(params[MUTE_PARAM + i].value))
state[i] ^= true; state[i] ^= true;
float in = inputs[IN_INPUT + i].value;
outputs[OUT_OUTPUT + i].value = state[i] ? in : 0.0;
if (inputs[IN_INPUT + i].active)
out = inputs[IN_INPUT + i].value;
outputs[OUT_OUTPUT + i].value = state[i] ? out : 0.0;
lights[MUTE_LIGHT + i].setBrightness(state[i] ? 0.9 : 0.0); lights[MUTE_LIGHT + i].setBrightness(state[i] ? 0.9 : 0.0);
} }
} }


Loading…
Cancel
Save