File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ Dattorro1997Tank::Dattorro1997Tank()
1414 lfo3.setFrequency (lfo3Freq);
1515 lfo4.setFrequency (lfo4Freq);
1616
17- lfo2.phase = 0.25 ;
18- lfo3.phase = 0.5 ;
19- lfo4.phase = 0.75 ;
17+ lfo2.setPhase ( 0.25 ) ;
18+ lfo3.setPhase ( 0.5 ) ;
19+ lfo4.setPhase ( 0.75 ) ;
2020
2121 lfo1.setRevPoint (0.5 );
2222 lfo2.setRevPoint (0.5 );
Original file line number Diff line number Diff line change @@ -70,7 +70,6 @@ class LFO {
7070class TriSawLFO {
7171public:
7272 TriSawLFO (double sampleRate = 44100.0 , double frequency = 1.0 ) {
73- phase = 0.0 ;
7473 _output = 0.0 ;
7574 _sampleRate = sampleRate;
7675 _step = 0.0 ;
@@ -137,7 +136,9 @@ class TriSawLFO {
137136 return _output;
138137 }
139138
140- double phase;
139+ void setPhase (double phase) {
140+ _step = phase;
141+ }
141142
142143private:
143144 double _output;
You can’t perform that action at this time.
0 commit comments