File: amosc.alg

package info (click to toggle)
audacity 2.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 129,312 kB
  • sloc: ansic: 373,350; cpp: 276,880; sh: 56,060; python: 18,922; makefile: 10,309; lisp: 8,365; xml: 1,888; perl: 1,798; java: 1,551; asm: 545; pascal: 395; sed: 58; awk: 35
file content (31 lines) | stat: -rw-r--r-- 1,106 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
(AMOSC-ALG
(NAME "amosc")
(ARGUMENTS ("sound_type" "input") ("double" "step") ("rate_type" "sr")
           ("double" "hz") ("time_type" "t0") ("sound_type" "amod")
           ("double" "phase"))
(TABLE "input")
(NOT-IN-INNER-LOOP "input")
(START (MIN input))
(STATE 
       ("double" "ph_incr" "0")
       ("table_type" "the_table" "sound_to_table(input)")
       ("sample_type *" "table_ptr" "susp->the_table->samples")
       ("double" "table_len" "susp->the_table->length")
       ("double" "phase" "compute_phase(phase, step, (long) susp->table_len,
        input->sr, sr, hz, &susp->ph_incr)") )
(ALWAYS-SCALE amod)
(TERMINATE (MIN amod))
(LOGICAL-STOP (MIN amod))
(INNER-LOOP "{
\t\tlong table_index = (long) phase;
\t\tdouble x1 = (double) (table_ptr[table_index]);
\t\toutput = (sample_type) ((x1 + (phase - table_index) * 
\t\t          (table_ptr[table_index + 1] - x1)) * amod);
\t\tphase += ph_incr;
\t\twhile (phase > table_len) phase -= table_len;
\t     }")
(CONSTANT "ph_incr" "table_len" "table_ptr" "the_table")
(SAMPLE-RATE "sr")
(FINALIZATION "    table_unref(susp->the_table);\n")
)