Debian Codegraph @

opcodes/adsynt2.xml

raw symbols SCIP
1 
2 <refentry id="adsynt2">
3 <indexterm id="IndexAdsynt2"><primary>adsynt2</primary></indexterm>
4 <refentryinfo><title>Signal Generators:Additive Synthesis/Resynthesis</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>adsynt2</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>adsynt2</refname>
13 <refpurpose>
14 Performs additive synthesis with an arbitrary number of partials -not necessarily harmonic- with interpolation.
15 </refpurpose>
16 </refnamediv>
17
18 <refsect1>
19 <title>Description</title>
20 <para>
21 Performs additive synthesis with an arbitrary number of partials, not necessarily harmonic. (see <link linkend="adsynt"><citetitle>adsynt</citetitle></link> for detailed manual)
22 </para>
23 </refsect1>
24
25 <refsect1>
26 <title>Syntax</title>
27 <synopsis>ar <command>adsynt2</command> kamp, kcps, iwfn, ifreqfn, iampfn, icnt [, iphs]</synopsis>
28 </refsect1>
29
30 <refsect1>
31 <title>Initialization</title>
32 <para>
33 <emphasis>iwfn</emphasis> -- table containing a waveform, usually a sine. Table values are not interpolated for performance reasons, so larger tables provide better quality.
34 </para>
35
36 <para>
37 <emphasis>ifreqfn</emphasis> -- table containing frequency values for each partial. <emphasis>ifreqfn</emphasis> may contain beginning frequency values for each partial, but is usually used for generating parameters at runtime with <emphasis>tablew</emphasis>. Frequencies must be relative to <emphasis>kcps</emphasis>. Size must be at least <emphasis>icnt</emphasis>.
38 </para>
39
40 <para>
41 <emphasis>iampfn</emphasis> -- table containing amplitude values for each partial. <emphasis>iampfn</emphasis> may contain beginning amplitude values for each partial, but is usually used for generating parameters at runtime with <emphasis>tablew</emphasis>. Amplitudes must be relative to <emphasis>kamp</emphasis>. Size must be at least <emphasis>icnt</emphasis>.
42 </para>
43
44 <para>
45 <emphasis>icnt</emphasis> -- number of partials to be generated
46 </para>
47
48 <para>
49 <emphasis>iphs</emphasis> -- initial phase of each oscillator, if <emphasis>iphs</emphasis> = -1, initialization is skipped. If <emphasis>iphs</emphasis> &gt; 1, all phases will be initialized with a random value.
50 </para>
51 </refsect1>
52
53 <refsect1>
54 <title>Performance</title>
55 <para>
56 <emphasis>kamp</emphasis> -- amplitude of note
57 </para>
58
59 <para>
60 <emphasis>kcps</emphasis> -- base frequency of note. Partial frequencies will be relative to <emphasis>kcps</emphasis>.
61 </para>
62
63 <para>
64 Frequency and amplitude of each partial is given in the two tables provided. The purpose of this opcode is to have an instrument generate synthesis parameters at k-rate and write them to global parameter tables with the <emphasis>tablew</emphasis> opcode.
65 </para>
66 <para>
67 <emphasis>adsynt2</emphasis> is identical to <emphasis>adsynt</emphasis> (by Peter Neubäcker), except it provides linear interpolation for amplitude envelopes of each partial. It is a bit slower than <emphasis>adsynt</emphasis>, but interpolation higly improves sound quality in fast amplitude envelope transients when <emphasis>kr</emphasis> &lt; <emphasis>sr</emphasis> (i.e. when <emphasis>ksmps</emphasis> &gt; 1). No interpolation is provided for pitch envelopes, since in this case sound quality degradation is not so evident even with high values of <emphasis>ksmps</emphasis>. It is not recommended when <emphasis>kr</emphasis> = <emphasis>sr</emphasis>, in this case <emphasis>adsynt</emphasis> is better (since it is faster).
68 </para>
69 </refsect1>
70
71 <refsect1>
72 <title>Examples</title>
73 <para>
74 Here is an example of the adsynt2 opcode. It uses the file <ulink url="examples/adsynt2.csd"><citetitle>adsynt2.csd</citetitle></ulink>. These two instruments perform additive synthesis. The output of each sounds like a Tibetan bowl. The first one is static, as parameters are only generated at init-time. In the second one, parameters are continuously changed.
75
76 <example>
77 <title>Example of the adsynt2 opcode.</title>
78
79
80
81 <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
82 <xi:include href="examples-xml/adsynt2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
83 </example>
84 </para>
85 </refsect1>
86
87 <refsect1>
88 <title>See also</title>
89 <para><link linkend="SiggenAdditive"><citetitle>Additive Synthesis/Resynthesis</citetitle></link></para>
90 </refsect1>
91
92 <refsect1>
93 <title>Credits</title>
94 <para>Written by &namegabriel;.</para>
95 <para>New in Csound 5 (Previously available only on CsoundAV)</para>
96 </refsect1>
97 </refentry>