Debian Codegraph @

scoregens/genpadsynth.xml

raw symbols SCIP
1
2 <refentry id="GENpadsynth">
3 <indexterm id="IndexGENpadsynth"><primary>GENpadsynth</primary></indexterm>
4 <refmeta>
5 <refentrytitle>GENpadsynth</refentrytitle>
6 </refmeta>
7
8 <refnamediv>
9 <refname>"padsynth"</refname>
10 <refpurpose>
11 Generate a sample table using the padsynth algorithm.
12 </refpurpose>
13 </refnamediv>
14
15 <refsect1>
16 <title>Description</title>
17 <para>Plugin gen in padsynth.</para>
18 <para>
19 Paul Octavian Nasca's "padsynth algorithm" adds bandwidth to each partial of a
20 periodic weaveform. This bandwidth is heard as color, movement, and additional
21 richness of sound.
22 </para>
23 <para>
24 First, the waveform is defined by the user as a series of harmonic partials.
25 Then, bandwidth is added by independently spreading each partial of the
26 original waveform from a single frequency across neighboring frequencies,
27 according to a "profile" function: a Gaussian curve, a square, or a rising
28 and then falling expontential.
29 </para>
30 <para>
31 The partials of the original waveform may be considered to be samples in a
32 discrete Fourier transform of the waveform. Normally there is not an exact
33 one-to-one correspondence between the frequencies of the samples (frequency
34 bins) of the discrete Fourier transform with the frequencies of the partials
35 of the original waveform, because any frequency in the inverse of the discrete
36 Fourier transform might be synthesized by interference between any number of
37 bins. However, the padsynth algorithm uses a simple trick to create this
38 correspondence. The discrete Fourier transform is simply made so large that
39 the frequency of any partial of the original waveform will be very close to
40 the frequency of the corresponding bin in the Fourier transform. Once this
41 correspondence has been created, the bandwidth profile can be applied by
42 centering it over the frequency bin of the original partial, scaling the
43 profile by the bandwidth, and simply multiplying the original partial by each
44 sample of the profile and adding the product to the corresponding bin of the
45 Fourier transform.
46 </para>
47 <para>
48 As the frequencies of the partials increase, their bandwidth may optionally
49 become wider or (less often) narrower.
50 </para>
51 <para>
52 Once each partial has been spread out in this way, the discrete Fourier
53 transform may be given random phases, and is then simply inverted to
54 synthesize the desired waveform, which may be used as the wavetable for
55 a digital oscillator.
56 </para>
57 <para>
58 N.B.: The size of the function table does NOT necessarily reflect one periodic
59 cycle of the waveform that it contains. The fundamental frequency must be used
60 to generate the desired pitch from an oscillator using the function table, e.g.
61 </para>
62 <code>
63 oscillator_hz = desired_hz * (sr / padsynth_size / fundamental_hz)
64 </code>
65 </refsect1>
66 <refsect1>
67 <title>Syntax</title>
68 <synopsis><command>f</command> # score_time table_size "padsynth" fundamental_frequency
69 partial_bandwidth partial_scale harmonic_stretch profile_shape profile_shape_parameter
70 partial1_amplitude [partial2_amplitude ...]</synopsis>
71 </refsect1>
72
73 <refsect1>
74 <title>Initialization</title>
75 <para>
76 <emphasis>table_size</emphasis> -- Function table size. Should be large,
77 e.g. 2^18 == 262144. Must be a power of 2 or power-of-2 plus 1 (see <link
78 linkend="f"><citetitle>f statement</citetitle></link>).
79 </para>
80
81 <para>
82 <emphasis>fundamental_frequency</emphasis> -- Fundamental frequency for
83 the generated table.
84 </para>
85 <para>
86 <emphasis>partial_bandwidth</emphasis> -- Bandwidth of each partial in cents.
87 </para>
88 <para>
89 <emphasis>partial_scale</emphasis> -- Scaling factor for bandwidth of each partial (log of increase/decrease
90 with partial frequency, 0 is no stretch or shrink).
91 </para>
92 <para>
93 <emphasis>harmonic_stretch</emphasis> -- Harmonic stretch/shrink for all partials (1 is harmonic).
94 </para>
95 <para>
96 <emphasis>profile_shape</emphasis> -- Number specifying the shape of the bandwidth profile:
97 1 = Gaussian, 2 = square, and 3 = exponential
98 </para>
99 <para>
100 <emphasis>profile_shape_parameter</emphasis> -- Parameter passed to the function generating the profile shape, e.g. exponent.
101 </para>
102 <para>
103 <emphasis>partial1_amplitude, partial2_amplitude, ...</emphasis> -- Amplitudes for each partial (may be zero).
104 </para>
105
106 </refsect1>
107
108 <refsect1>
109 <title>Examples</title>
110 <para>
111 Here is an example of the GENpadsynth routine. It uses the files <ulink url="examples/padsynth_gen.csd"><citetitle>padsynth_gen.csd</citetitle></ulink>.
112 <example>
113 <title>An example of the GENpadsynth routine.</title>
114 <xi:include href="examples-xml/padsynth_gen.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
115 </example>
116 </para>
117 </refsect1>
118
119 <refsect1>
120 <title>See Also</title>
121 <para> More information on Padsynth: <ulink url="http://www.paulnasca.com/algorithms-created-by-me"><citetitle>http://www.paulnasca.com/algorithms-created-by-me</citetitle></ulink></para>
122 </refsect1>
123
124 <refsect1>
125 <title>Credits</title>
126 <para>Written by &namemichael;</para>
127 <para>New in version 6.05</para>
128 </refsect1>
129 </refentry>