Skip to content

Commit

Permalink
Sharper SC wave shape
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-13 committed May 7, 2022
1 parent a4370a5 commit 9d88c5e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions WECore/RichterLFO/RichterWavetables.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ namespace WECore::Richter {
for (int idx = 0; idx < Wavetables::SIZE; idx++) {
const double radians {idx * CoreMath::DOUBLE_TAU / Wavetables::SIZE};

// y = -2sin( (0.15x - 1.21)^6 ) + 1
_sidechainTable[idx] =
(
-2 * sin(pow(0.15 * radians - 1.21, 6)) + 1
radians < 0.4497 ?
-2 * sin(pow(0.2 * radians - 0.8245, 6) * 10) + 1 :
-2 * sin(pow(0.15 * radians - 0.802, 6) * 10) + 1
);
}
}
Expand Down

0 comments on commit 9d88c5e

Please sign in to comment.