> Sound.SC3.UGen.Help.viewSC3Help "LPCSynth" > Sound.SC3.UGen.DB.ugenSummary "LPCSynth" > import Sound.SC3 > let { load_data fd b i d = > if length d < 512 > then send fd (b_setn1 b i d) > else do { send fd (b_setn1 b i (take 512 d)) > ; load_data fd b (i + 512) (drop 512 d) } > ; lpc_instr b n lpc = > let { x = mouseX' KR 0.05 1.5 Linear 0.2 > ; y = mouseY' KR 0.25 2.0 Linear 0.2 > ; f = x / constant (lpcAnalysisDuration (lpcHeader lpc)) > ; ptr = lfSaw AR f 1 * 0.5 + 0.5 > ; MCE [cps, rms, err] = lpcVals AR b ptr > ; nh = floorE (22000 / cps) > ; voc = blip AR (cps * y) nh * (1 - err) > ; s = lpcSynth b (voc + (n * err * 20)) ptr } > in s * 1e-5 * rms } > in do { lpc <- lpcRead "/home/rohan/cvs/tn/tn-56/lpc/fate.lpc" > ; let { n = pinkNoise 'a' AR > ; d = lpcSC3 lpc > ; s = lpc_instr 10 n lpc } > in withSC3 (\fd -> do { async fd (b_alloc 10 (length d) 1) > ; load_data fd 10 0 d > ; play fd (out 0 s) }) }