Browse Source

Update to Rack v1 API

tags/v1.1.0
Andrew Belt 6 years ago
parent
commit
50e41da0ae
2 changed files with 6 additions and 6 deletions
  1. +4
    -4
      src/ABC.cpp
  2. +2
    -2
      src/SpringReverb.cpp

+ 4
- 4
src/ABC.cpp View File

@@ -48,13 +48,13 @@ struct ABC : Module {

void step() override {
float a1 = inputs[A1_INPUT].value;
float b1 = inputs[B1_INPUT].normalize(5.f) * 2.f*dsp::exponentialBipolar(80.f, params[B1_LEVEL_PARAM].value);
float c1 = inputs[C1_INPUT].normalize(10.f) * dsp::exponentialBipolar(80.f, params[C1_LEVEL_PARAM].value);
float b1 = inputs[B1_INPUT].getNormalVoltage(5.f) * 2.f*dsp::exponentialBipolar(80.f, params[B1_LEVEL_PARAM].value);
float c1 = inputs[C1_INPUT].getNormalVoltage(10.f) * dsp::exponentialBipolar(80.f, params[C1_LEVEL_PARAM].value);
float out1 = a1 * b1 / 5.f + c1;

float a2 = inputs[A2_INPUT].value;
float b2 = inputs[B2_INPUT].normalize(5.f) * 2.f*dsp::exponentialBipolar(80.f, params[B2_LEVEL_PARAM].value);
float c2 = inputs[C2_INPUT].normalize(10.f) * dsp::exponentialBipolar(80.f, params[C2_LEVEL_PARAM].value);
float b2 = inputs[B2_INPUT].getNormalVoltage(5.f) * 2.f*dsp::exponentialBipolar(80.f, params[B2_LEVEL_PARAM].value);
float c2 = inputs[C2_INPUT].getNormalVoltage(10.f) * dsp::exponentialBipolar(80.f, params[C2_LEVEL_PARAM].value);
float out2 = a2 * b2 / 5.f + c2;

// Set outputs


+ 2
- 2
src/SpringReverb.cpp View File

@@ -69,8 +69,8 @@ struct SpringReverb : Module {
float in2 = inputs[IN2_INPUT].value;
const float levelScale = 0.030;
const float levelBase = 25.0;
float level1 = levelScale * dsp::exponentialBipolar(levelBase, params[LEVEL1_PARAM].value) * inputs[CV1_INPUT].normalize(10.0) / 10.0;
float level2 = levelScale * dsp::exponentialBipolar(levelBase, params[LEVEL2_PARAM].value) * inputs[CV2_INPUT].normalize(10.0) / 10.0;
float level1 = levelScale * dsp::exponentialBipolar(levelBase, params[LEVEL1_PARAM].value) * inputs[CV1_INPUT].getNormalVoltage(10.0) / 10.0;
float level2 = levelScale * dsp::exponentialBipolar(levelBase, params[LEVEL2_PARAM].value) * inputs[CV2_INPUT].getNormalVoltage(10.0) / 10.0;
float dry = in1 * level1 + in2 * level2;

// HPF on dry


Loading…
Cancel
Save