Skip to content

Commit

Permalink
Accumulator: Fix bug in control rate trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
ideoforms committed Aug 16, 2024
1 parent f80ee37 commit 72e0537
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/src/node/envelope/accumulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ void Accumulator::trigger(std::string name, float value)
{
if (name == SIGNALFLOW_DEFAULT_TRIGGER)
{
float strike_force = value == SIGNALFLOW_NULL_FLOAT ? value : this->strike_force->out[0][0];
float increment = strike_force * (1.0 - strike_force);
float strike_force = (value == SIGNALFLOW_NULL_FLOAT) ? this->strike_force->out[0][0] : value;
float increment = strike_force * (1.0 - this->current_value);
this->current_value += increment;
}
}
Expand Down

0 comments on commit 72e0537

Please sign in to comment.