-
Notifications
You must be signed in to change notification settings - Fork 29
/
ATSadd.xml
99 lines (95 loc) · 6.7 KB
/
ATSadd.xml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<refentry id="ATSadd">
<indexterm id="IndexATSadd"><primary>ATSadd</primary></indexterm>
<refentryinfo><title>Spectral Processing:ATS</title></refentryinfo>
<refmeta>
<refentrytitle>ATSadd</refentrytitle>
</refmeta>
<refnamediv>
<refname>ATSadd</refname>
<refpurpose> uses the data from an ATS analysis file to perform additive synthesis.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
<emphasis>ATSadd</emphasis> reads from an ATS analysis file and uses the data to perform additive synthesis using an internal array of interpolating oscillators.
</para>
</refsect1>
<refsect1>
<title>Syntax</title>
<synopsis>ar <command>ATSadd</command> ktimepnt, kfmod, iatsfile, ifn, ipartials[, ipartialoffset, \
ipartialincr, igatefn]</synopsis>
</refsect1>
<refsect1>
<title>Initialization</title>
<para>
<emphasis>iatsfile</emphasis> – the ATS number (n in ats.n) or the name in quotes of the analysis file made using <link linkend="UtilityAtsa"><citetitle>ATSA</citetitle></link>.
</para>
<para>
<emphasis>ifn</emphasis> – table number of a stored function containing a sine wave for <emphasis>ATSadd</emphasis> and a cosine for <link linkend="ATSaddnz"><citetitle>ATSaddnz</citetitle></link> (see examples below for more info)
</para>
<para><emphasis>ipartials</emphasis> – number of partials that will be used in the resynthesis (the noise has a maximum of 25 bands)
</para>
<para><emphasis>ipartialoffset</emphasis> (optional) – is the first partial used (defaults to 0).
</para>
<para><emphasis>ipartialincr</emphasis> (optional) – sets an increment by which these synthesis opcodes counts up from <emphasis>ipartialoffset</emphasis> for ibins components in the re-synthesis (defaults to 1).
</para>
<para><emphasis>igatefn</emphasis> (optional) – is the number of a stored function which will be applied to the amplitudes of the analysis bins before resynthesis takes place. If <emphasis>igatefn</emphasis> is greater than 0 the amplitudes of each bin will be scaled by <emphasis>igatefn</emphasis> through a simple mapping process. First, the amplitudes of all of the bins in all of the frames in the entire analysis file are compared to determine the maximum amplitude value. This value is then used to create normalized amplitudes as indices into the stored function <emphasis>igatefn</emphasis>. The maximum amplitude will map to the last point in the function. An amplitude of 0 will map to the first point in the function. Values between 0 and 1 will map accordingly to points along the function table. See the examples below.
</para>
</refsect1>
<refsect1>
<title>Performance</title>
<para><emphasis>ktimepnt</emphasis> – The time pointer in seconds used to index the ATS file. Used for <emphasis>ATSadd</emphasis> exactly the same as for <link linkend="pvoc"><citetitle>pvoc</citetitle></link>.</para>
<para><emphasis>ATSadd</emphasis> and <link linkend="ATSaddnz"><citetitle>ATSaddnz</citetitle></link> are based on <link linkend="pvadd"><citetitle>pvadd</citetitle></link> by Richard Karpen and use files created by Juan Pampin's ATS (<ulink url="https://ccrma.stanford.edu/~juan/ATS_manual.html"><citetitle>Analysis - Transformation - Synthesis</citetitle></ulink>).
</para>
<para><emphasis>kfmod</emphasis> – A control-rate transposition factor: a value of 1 incurs no transposition, 1.5 transposes up a perfect fifth, and .5 down an octave. Used for <emphasis>ATSadd</emphasis> exactly the same as for <link linkend="pvoc"><citetitle>pvoc</citetitle></link>.
</para>
<para><emphasis>ATSadd</emphasis> reads from an ATS analysis file and uses the data to perform additive synthesis using an internal array of interpolating oscillators. The user supplies the wave table (usually one period of a sine wave), and can choose which analysis partials will be used in the re-synthesis.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<programlisting> ktime <emphasis role="opc">line</emphasis> 0, p3, 2.5
asig <emphasis role="opc">ATSadd</emphasis> ktime, 1, "clarinet.ats", 1, 20, 2
</programlisting>
<para>In the example above, <emphasis>ipartials</emphasis> is 20 and <emphasis>ipartialoffset</emphasis> is 2. This will synthesize the 3rd thru 22nd partials in the "clarinet.ats" analysis file. <emphasis>kfmod</emphasis> is 1 so there will be no pitch transformation. Since the <emphasis>ktimepnt</emphasis> envelope moves from 0 to 2.5 over the duration of the note, the analysis file will be read from 0 to 2.5 seconds of the original duration of the analysis over the duration of the csound note, this way we can change the duration independent of the pitch.
</para>
<para>
Here is a complete example of the ATSadd opcode. It uses the file <ulink url="examples/ATSadd.csd"><citetitle>ATSadd.csd</citetitle></ulink>.
<example>
<title>Example of the ATSadd opcode.</title>
<xi:include href="examples-xml/ATSadd.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
</para>
<para>
Here is another example of the ATSadd opcode. It uses the file <ulink url="examples/ATSadd-2.csd"><citetitle>ATSadd-2.csd</citetitle></ulink>.
<example>
<title>Example 2 of the ATSadd opcode.</title>
<xi:include href="examples-xml/ATSadd-2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
</para>
</refsect1>
<refsect1>
<title>See also</title>
<para><link linkend="ATSread"><citetitle>ATSread</citetitle></link>,
<link linkend="ATSreadnz"><citetitle>ATSreadnz</citetitle></link>,
<link linkend="ATSinfo"><citetitle>ATSinfo</citetitle></link>,
<link linkend="ATSbufread"><citetitle>ATSbufread</citetitle></link>,
<link linkend="ATScross"><citetitle>ATScross</citetitle></link>,
<link linkend="ATSinterpread"><citetitle>ATSinterpread</citetitle></link>,
<link linkend="ATSpartialtap"><citetitle>ATSpartialtap</citetitle></link>,
<link linkend="ATSaddnz"><citetitle>ATSaddnz</citetitle></link>,
<link linkend="ATSsinnoi"><citetitle>ATSsinnoi</citetitle></link></para>
</refsect1>
<refsect1>
<title>Credits</title>
<para>
<simplelist>
<member>Author: Alex Norman</member>
<member>Seattle,Washington</member>
<member>2004</member>
</simplelist>
</para>
</refsect1>
</refentry>