Skip to content

Commit

Permalink
Tweak to behaviour of random internal modulators
Browse files Browse the repository at this point in the history
  • Loading branch information
timchurches committed Oct 31, 2015
1 parent afde6ce commit 2787df7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions peaks/modulations/lfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ int16_t FmLfo::ComputeSampleNoise() {
int16_t sample;
int32_t linear_interpolation = value_ + \
((next_value_ - value_) * static_cast<int32_t>(phase >> 17) >> 15);
if (parameter_ < 0) {
if (parameter_ <= 0) {
int32_t balance = parameter_ + 32767;
sample = value_ + ((linear_interpolation - value_) * balance >> 15);
} else {
Expand Down Expand Up @@ -589,7 +589,7 @@ int16_t WsmLfo::ComputeSampleNoise() {
int16_t sample;
int32_t linear_interpolation = value_ + \
((next_value_ - value_) * static_cast<int32_t>(phase >> 17) >> 15);
if (parameter_ < 0) {
if (parameter_ <= 0) {
int32_t balance = parameter_ + 32767;
sample = value_ + ((linear_interpolation - value_) * balance >> 15);
} else {
Expand Down

0 comments on commit 2787df7

Please sign in to comment.