Debian Codegraph @

scoregens/gen30.xml

raw symbols SCIP
1
2 <refentry id="GEN30">
3 <indexterm id="IndexGEN30"><primary>GEN30</primary></indexterm>
4 <refmeta>
5 <refentrytitle>GEN30</refentrytitle>
6 </refmeta>
7
8 <refnamediv>
9 <refname>GEN30</refname>
10 <refpurpose>
11 Generates harmonic partials by analyzing an existing table.
12 </refpurpose>
13 </refnamediv>
14
15 <refsect1>
16 <title>Description</title>
17 <para>
18 Extracts a range of harmonic partials from an existing waveform.
19 </para>
20 </refsect1>
21
22 <refsect1>
23 <title>Syntax</title>
24 <synopsis><command>f</command> # time size 30 src minh maxh [ref_sr] [interp]</synopsis>
25 </refsect1>
26
27 <refsect1>
28 <title>Performance</title>
29 <para>
30 <emphasis>src</emphasis> -- source ftable
31 </para>
32
33 <para>
34 <emphasis>minh</emphasis> -- lowest harmonic number
35 </para>
36
37 <para>
38 <emphasis>maxh</emphasis> -- highest harmonic number
39 </para>
40
41 <para>
42 <emphasis>ref_sr</emphasis> (optional) -- maxh is scaled by (sr / ref_sr). The default value of ref_sr is sr. If <emphasis>ref_sr</emphasis> is zero or negative, it is now ignored.
43 </para>
44
45 <para>
46 <emphasis>interp</emphasis> (optional) -- if non-zero, allows changing the amplitude of the lowest and highest harmonic partial depending on the fractional part of <emphasis>minh</emphasis> and <emphasis>maxh</emphasis>. For example, if <emphasis>maxh</emphasis> is 11.3 then the 12th harmonic partial is added with 0.3 amplitude. This parameter is zero by default.
47 </para>
48
49 <para>
50 <emphasis>GEN30</emphasis> does not support tables with an extended guard point (ie. table size = power of two + 1). Although such tables will work both for input and output, when reading source table(s), the guard point is ignored, and when writing the output table, guard point is simply copied from the first sample (table index = 0).
51 </para>
52
53 <para>
54 The reason of this limitation is that <emphasis>GEN30</emphasis> uses FFT, which requires power of two table size. <link linkend="GEN32"><citetitle>GEN32</citetitle></link> allows using linear interpolation for resampling and phase shifting, which makes it possible to use any table size (however, for partials calculated with FFT, the power of two limitation still exists).
55 </para>
56 </refsect1>
57
58 <refsect1>
59 <title>Examples</title>
60 <para>
61 Here is an example of the GEN30 routine. It uses the files <ulink url="examples/gen30.csd"><citetitle>gen30.csd</citetitle></ulink>.
62 <example>
63 <title>Example of the GEN30 routine.</title>
64 <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>
65 <xi:include href="examples-xml/gen30.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
66 </example>
67 </para>
68 </refsect1>
69
70 <refsect1>
71 <title>Credits</title>
72 <para>Author: &nameistvan;</para>
73 <para>New in version 4.16</para>
74 </refsect1>
75 </refentry>