Skip to content

Commit 43e3ed8

Browse files
author
Martin Klang
committed
changed RampOscillator to output range [-1, 1]
1 parent 08afbed commit 43e3ed8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

LibSource/RampOscillator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ class RampOscillator : public Oscillator {
3636
float sample = phase;
3737
phase += incr;
3838
if(phase >= 1.0f)
39-
phase -= 1.0f;
39+
phase -= 2.0f;
4040
return sample;
4141
}
4242
float getNextSample(float fm){
4343
float sample = phase;
4444
phase += incr + fm;
4545
if(phase >= 1.0f)
46-
phase -= 1.0f;
46+
phase -= 2.0f;
4747
return sample;
4848
}
4949
static RampOscillator* create(float sr){

0 commit comments

Comments
 (0)