mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-28 16:23:49 +01:00
Move library tree where it belongs
This commit is contained in:
15
lib-src/libnyquist/nyquist/tran/tone.alg
Normal file
15
lib-src/libnyquist/nyquist/tran/tone.alg
Normal file
@@ -0,0 +1,15 @@
|
||||
(TONE-ALG
|
||||
(NAME "tone")
|
||||
(ARGUMENTS ("sound_type" "input") ("double" "hz"))
|
||||
(START (MIN input))
|
||||
(TERMINATE (MIN input))
|
||||
(LOGICAL-STOP (MIN input))
|
||||
(STATE ("double" "b" "2.0 - cos(hz * PI2 / input->sr)" TEMP)
|
||||
("double" "c2" "b - sqrt((b * b) - 1.0)")
|
||||
("double" "c1" "(1.0 - susp->c2) * input->scale")
|
||||
("double" "prev" "0.0"))
|
||||
(INTERNAL-SCALING input)
|
||||
(CONSTANT "c1" "c2")
|
||||
(INNER-LOOP "output = (sample_type) (prev = c1 * input + c2 * prev)")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user