Hi,

I need help with the following code from Tutorial2  p.34 & p.75. There are
errors when compiling

//-----------------------------------------------------------------
import("math.lib");
import("music.lib");
import("filter.lib");

 // S&H:
SH(trig,x) = (*(1 - trig) + x * trig) ~ _;

//First order Butterworth lowpass filter
lowpass1 = tf1s(0,1,1,PI*SR/2);

// pitch tracker:
Pitch(a,x) = a * SR / max(M,1) - a * SR * (M==0)
  with {
  U = (x’ < 0) & (x >= 0);
V = +(U) ~ %(int(a));
W = U & (V == a);
N = (+(1) : *(1 - W)) ~ _ ;
M = SH( N == 0 , N’ + 1);
  };
PtchPr(a) = dcblockerat(80) : (lowpass1 : Pitch(a)) ~ max(100);

I = hslider("Index of modulation",0,0,5,0.001) ;
r = hslider("c:m",1,0.1,5,0.001) ;

del(r,I,x) = x : fdelay3(1 << 17, dt + 1)
       with {
k = 8.0; // pitch-tracking analyzing cycles number
fc = PtchPr(k,x);
dt = (0.5 * osci(fc / r) + 0.5) * I / (PI * fc) *SR;
};
process = del(r,I);
//---------------------------------------------------------------------
errors:

syntax error, unexpected EXTRA, expecting PAR or RPAR (in M = SH([...]) and

U = ([...]);)


I don't see any extra or missing parenthesis. Please help.


Thanks.
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to