1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-12 15:11:09 +02:00
2010-01-24 09:19:39 +00:00

21 lines
631 B
Plaintext

(ATONE-ALG
(NAME "atone")
(ARGUMENTS ("sound_type" "s") ("double" "hz"))
(START (MIN s))
(TERMINATE (MIN s))
(LOGICAL-STOP (MIN s))
(STATE ("double" "bb" "2.0 - cos(hz * PI2 / s->sr)" TEMP)
("double" "cc" "bb - sqrt((bb * bb) - 1.0)")
("double" "prev" "0.0"))
(CONSTANT "cc")
(INNER-LOOP-LOCALS " double current;
")
(INNER-LOOP "current = s;
prev = cc * (prev + current); /* use prev as temp variable ... */
output = (float) prev; /* ... so we can do proper type conversion */
prev -= current;")
; old code was:
; prev = (output = cc * (prev + current)) - current;")
)