zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 462ac9082423de323d2a6b0962b37c7f878cc015
parent 0a29877daa3560d63e58fe1f73b34909620de838
Author: Mark McCurry <[email protected]>
Date:   Thu, 11 Jun 2009 12:50:29 -0400

Fixed off by 2 error in OscilGen::getspectrum()

Diffstat:
Msrc/Synth/OscilGen.C | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/Synth/OscilGen.C b/src/Synth/OscilGen.C @@ -988,10 +988,10 @@ void OscilGen::getspectrum(int n, REALTYPE *spc,int what){ }; if (what==0) { - for (int i=0;i<(n-1);i++) outoscilFFTfreqs.s[i]=outoscilFFTfreqs.c[i]=spc[i+1]; + for (int i=0;i<n;i++) outoscilFFTfreqs.s[i]=outoscilFFTfreqs.c[i]=spc[i]; for (int i=n;i<OSCIL_SIZE/2;i++) outoscilFFTfreqs.s[i]=outoscilFFTfreqs.c[i]=0.0; adaptiveharmonic(outoscilFFTfreqs,0.0); - for (int i=1;i<n;i++) spc[i-1]=outoscilFFTfreqs.s[i]; + for (int i=0;i<n;i++) spc[i]=outoscilFFTfreqs.s[i]; adaptiveharmonicpostprocess(spc,n-1); }; }; @@ -1178,5 +1178,3 @@ void OscilGen::getfromXML(XMLwrapper *xml){ }; }; - -