Browse Source

Rename reset to initialize

tags/v0.5.0
Andrew Belt 6 years ago
parent
commit
f9db71286e
3 changed files with 11 additions and 3 deletions
  1. +1
    -1
      src/SEQ3.cpp
  2. +1
    -1
      src/Scope.cpp
  3. +9
    -1
      src/VCF.cpp

+ 1
- 1
src/SEQ3.cpp View File

@@ -102,7 +102,7 @@ struct SEQ3 : Module {
gateMode = (GateMode)json_integer_value(gateModeJ);
}

void initialize() override {
void reset() override {
for (int i = 0; i < 8; i++) {
gateState[i] = false;
}


+ 1
- 1
src/Scope.cpp View File

@@ -59,7 +59,7 @@ struct Scope : Module {
external = json_integer_value(extJ);
}

void initialize() override {
void reset() override {
lissajous = false;
external = false;
}


+ 9
- 1
src/VCF.cpp View File

@@ -75,6 +75,11 @@ struct LadderFilter {
for (int i = 0; i < 4; i++)
state[i] += (1.0 / 6.0) * dt * (deriv1[i] + 2.0 * deriv2[i] + 2.0 * deriv3[i] + deriv4[i]);
}
void reset() {
for (int i = 0; i < 4; i++) {
state[i] = 0.0;
}
}
};


@@ -103,7 +108,10 @@ struct VCF : Module {
LadderFilter filter;

VCF() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS) {}
void step();
void step() override;
void reset() override {
filter.reset();
}
};




Loading…
Cancel
Save