diff options
Diffstat (limited to 'pd/extra')
-rw-r--r-- | pd/extra/expr~/makefile | 2 | ||||
-rw-r--r-- | pd/extra/pd~/makefile | 2 | ||||
-rw-r--r-- | pd/extra/sigmund~/sigmund~.c | 21 |
3 files changed, 13 insertions, 12 deletions
diff --git a/pd/extra/expr~/makefile b/pd/extra/expr~/makefile index 2d74ba36..4c648140 100644 --- a/pd/extra/expr~/makefile +++ b/pd/extra/expr~/makefile @@ -88,7 +88,7 @@ LINUXINCLUDE = -I../../src $(CC) -g $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.pd_linux_o -c $*.c expr.pd_linux: $(LINUXOBJ) - $(CC) -export_dynamic -shared -o expr.pd_linux $(LINUXOBJ) -lc -lm + $(CC) -shared -o expr.pd_linux $(LINUXOBJ) -lc -lm strip --strip-unneeded expr.pd_linux expr~.pd_linux: expr.pd_linux diff --git a/pd/extra/pd~/makefile b/pd/extra/pd~/makefile index 492c20c2..d069c73d 100644 --- a/pd/extra/pd~/makefile +++ b/pd/extra/pd~/makefile @@ -10,6 +10,6 @@ d_ppc: pdsched.d_ppc pdsched.pd_linux: pdsched.c $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c - $(CC) -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm + $(CC) -shared -o $*.pd_linux $*.o -lc -lm strip --strip-unneeded $*.pd_linux rm -f $*.o diff --git a/pd/extra/sigmund~/sigmund~.c b/pd/extra/sigmund~/sigmund~.c index 0f8b9283..d5211ac6 100644 --- a/pd/extra/sigmund~/sigmund~.c +++ b/pd/extra/sigmund~/sigmund~.c @@ -235,7 +235,7 @@ static void sigmund_getrawpeaks(int npts, float *insamps, float param1, float param2, float param3, float hifreq) { float oneovern = 1.0/ (float)npts; - float fperbin = 0.5 * srate * oneovern; + float fperbin = 0.5 * srate * oneovern, totalpower = 0; int npts2 = 2*npts, i, bin; int peakcount = 0; float *fp1, *fp2; @@ -272,16 +272,18 @@ static void sigmund_getrawpeaks(int npts, float *insamps, rawimag[-3] = -rawimag[3]; rawimag[-4] = -rawimag[4]; #if 1 - for (i = 0, fp1 = rawreal, fp2 = rawimag; i < npts-1; i++, fp1++, fp2++) + for (i = 0, fp1 = rawreal, fp2 = rawimag; i < maxbin; i++, fp1++, fp2++) { - float x1 = fp1[1] - fp1[-1], x2 = fp2[1] - fp2[-1]; - powbuf[i] = x1*x1+x2*x2; + float x1 = fp1[1] - fp1[-1], x2 = fp2[1] - fp2[-1], p = powbuf[i] = x1*x1+x2*x2; + if (i >= 2) + totalpower += p; } - powbuf[npts-1] = 0; + powbuf[maxbin] = powbuf[maxbin+1] = 0; + *power = 0.5 * totalpower *oneovern * oneovern; #endif for (peakcount = 0; peakcount < npeak; peakcount++) { - float pow1, maxpower = 0, totalpower = 0, windreal, windimag, windpower, + float pow1, maxpower = 0, windreal, windimag, windpower, detune, pidetune, sinpidetune, cospidetune, ampcorrect, ampout, ampoutreal, ampoutimag, freqout, powmask; int bestindex = -1; @@ -296,14 +298,12 @@ static void sigmund_getrawpeaks(int npts, float *insamps, if (pow1 > thresh) maxpower = pow1, bestindex = bin; } - totalpower += pow1; } if (totalpower <= 0 || maxpower < 1e-10*totalpower || bestindex < 0) break; fp1 = rawreal+bestindex; fp2 = rawimag+bestindex; - *power = 0.5 * totalpower *oneovern * oneovern; powmask = maxpower * exp(-param1 * log(10.) / 10.); /* if (loud > 2) post("maxpower %f, powmask %f, param1 %f", @@ -1054,6 +1054,7 @@ static void sigmund_print(t_sigmund *x) post("stabletime %g", x->x_stabletime); post("growth %g", x->x_growth); post("minpower %g", x->x_minpower); + x->x_loud = 1; } static void sigmund_free(t_sigmund *x) @@ -1394,7 +1395,7 @@ void sigmund_tilde_setup(void) gensym("print"), 0); class_addmethod(sigmund_class, (t_method)sigmund_printnext, gensym("printnext"), A_FLOAT, 0); - post("sigmund~ version 0.05"); + post("sigmund~ version 0.06"); } #endif /* PD */ @@ -1641,7 +1642,7 @@ int main() class_register(CLASS_BOX, c); sigmund_class = c; - post("sigmund~ v0.05"); + post("sigmund~ v0.06"); return (0); } |