From dd657ad3f1428b026486db3ec36691df17ddf515 Mon Sep 17 00:00:00 2001 From: "Steve M. Robbins" Date: Sat, 22 Oct 2011 04:54:51 +0200 Subject: Import nyquist_3.05.orig.tar.gz [dgit import orig nyquist_3.05.orig.tar.gz] --- tran/atonev.alg | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tran/atonev.alg (limited to 'tran/atonev.alg') diff --git a/tran/atonev.alg b/tran/atonev.alg new file mode 100644 index 0000000..441206f --- /dev/null +++ b/tran/atonev.alg @@ -0,0 +1,25 @@ +(ATONEV-ALG +(NAME "atonev") +(ARGUMENTS ("sound_type" "s1") ("sound_type" "hz")) +(INLINE-INTERPOLATION T) +(LINEAR hz) +(ALWAYS-SCALE hz) +(START (MAX s1 hz)) +(TERMINATE (MIN s1 hz)) +(LOGICAL-STOP (MIN s1)) +(STATE ("double" "cc" "0.0") + ("double" "prev" "0.0; + hz->scale = (sample_type) (hz->scale * (PI2 / s1->sr))")) +(LINEAR s1) +(SAMPLE-RATE (MAX s1)) +(STEP-FUNCTION hz) +(DEPENDS ("bb" "hz" "2.0 - cos(hz)" TEMP "register double") + ("cc" "hz" "bb - sqrt((bb * bb) - 1.0)")) +(CONSTANT "cc") +(INNER-LOOP-LOCALS " double current; +") +(INNER-LOOP "current = s1; + prev = cc * (prev + current); + output = (sample_type) prev; + prev -= current;") +) -- cgit v1.2.3