Skip to content

Commit

Permalink
corrected new oscillator calcs!
Browse files Browse the repository at this point in the history
  • Loading branch information
gregrecco67 committed Apr 4, 2024
1 parent 217d45c commit 81b3aa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/QuadOsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ class QuadOscillator
positions[i] = { 0.f, 0.f, 0.f, 0.f };
if (params.wave == Wavetype::sine) {
for (int v = 0; v < 4; v++) {
positions[i].xL += (gainsL[v] * sineValueForPhaseAndTones(phases[v] + params.phaseShift + 0.25f * (float)pi, params.tones)) * .25f;
positions[i].xL += (gainsL[v] * sineValueForPhaseAndTones(phases[v] + params.phaseShift + 0.5f * (float)pi, params.tones)) * .25f;
positions[i].yL += (gainsL[v] * sineValueForPhaseAndTones(phases[v] + params.phaseShift, params.tones)) * .25f;
positions[i].xR += (gainsR[v] * sineValueForPhaseAndTones(phases[v] + params.phaseShift + 0.25f * (float)pi, params.tones)) * .25f;
positions[i].xR += (gainsR[v] * sineValueForPhaseAndTones(phases[v] + params.phaseShift + 0.5f * (float)pi, params.tones)) * .25f;
positions[i].yR += (gainsR[v] * sineValueForPhaseAndTones(phases[v] + params.phaseShift, params.tones)) * .25f;
phases[v] += phaseIncs[v];
if (phases[v] > pi) { phases[v] -= 2.f * (float)pi; }
Expand Down

0 comments on commit 81b3aa1

Please sign in to comment.