Debian Codegraph @

opcodes/gbuzz.xml

raw symbols SCIP
1
2 <refentry id="gbuzz">
3 <indexterm id="IndexGbuzz"><primary>gbuzz</primary></indexterm>
4 <refentryinfo><title>Signal Generators:Dynamic Spectrum Oscillators</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>gbuzz</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>gbuzz</refname>
11 <refpurpose>
12 Output is a set of harmonically related cosine partials.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 Output is a set of harmonically related cosine partials.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis>ares <command>gbuzz</command> xamp, xcps, knh, klh, kmul, ifn [, iphs]</synopsis>
26 </refsect1>
27
28 <refsect1>
29 <title>Initialization</title>
30 <para>
31 <emphasis>ifn</emphasis> -- table number of a stored function containing a cosine wave. A large table of at least 8192 points is recommended.
32 </para>
33
34 <para>
35 <emphasis>iphs</emphasis> (optional, default=0) -- initial phase of the fundamental frequency, expressed as a fraction of a cycle (0 to 1). A negative value will cause phase initialization to be skipped. The default value is zero
36 </para>
37 </refsect1>
38
39 <refsect1>
40 <title>Performance</title>
41 <para>
42 The buzz units generate an additive set of harmonically related cosine partials of fundamental frequency <emphasis>xcps</emphasis>, and whose amplitudes are scaled so their summation peak equals <emphasis>xamp</emphasis>. The selection and strength of partials is determined by the following control parameters:
43 </para>
44
45 <para>
46 <emphasis>knh</emphasis> -- total number of harmonics requested. If <emphasis>knh</emphasis> is negative, the absolute value is used. If <emphasis>knh</emphasis> is zero, a value of 1 is used.
47 </para>
48
49 <para>
50 <emphasis>klh</emphasis> -- lowest harmonic present. Can be positive, zero or negative. In <emphasis>gbuzz</emphasis> the set of partials can begin at any partial number and proceeds upwards; if <emphasis>klh</emphasis> is negative, all partials below zero will reflect as positive partials without phase change (since cosine is an even function), and will add constructively to any positive partials in the set.
51 </para>
52
53 <para>
54 <emphasis>kmul</emphasis> -- specifies the multiplier in the series of amplitude coefficients. This is a power series: if the <emphasis>klh</emphasis>th partial has a strength coefficient of A, the (<emphasis>klh</emphasis> + n)th partial will have a coefficient of A * (<emphasis>kmul</emphasis> ** n), i.e. strength values trace an exponential curve. <emphasis>kmul</emphasis> may be positive, zero or negative, and is not restricted to integers.
55 </para>
56
57 <para>
58 <link linkend="buzz"><citetitle>buzz</citetitle></link> and <emphasis>gbuzz </emphasis>are useful as complex sound sources in subtractive synthesis. <emphasis>buzz</emphasis> is a special case of the more general <emphasis>gbuzz</emphasis> in which <emphasis>klh</emphasis> = <emphasis>kmul</emphasis> = 1; it thus produces a set of <emphasis>knh</emphasis> equal-strength harmonic partials, beginning with the fundamental. (This is a band-limited pulse train; if the partials extend to the Nyquist, i.e. <emphasis>knh</emphasis> = int (sr / 2 / fundamental freq.), the result is a real pulse train of amplitude <emphasis>xamp</emphasis>.)
59 </para>
60
61 <para>
62 Although both <emphasis>knh</emphasis> and <emphasis>klh</emphasis> may be varied during performance, their internal values are necessarily integer and may cause <quote>pops</quote> due to discontinuities in the output. <emphasis>kmul,</emphasis> however, can be varied during performance to good effect. <emphasis>gbuzz</emphasis> can be amplitude- and/or frequency-modulated by either control or audio signals.
63 </para>
64
65 <para>
66 N.B. This unit has its analog in <link linkend="GEN11"><citetitle>GEN11</citetitle></link>, in which the same set of cosines can be stored in a function table for sampling by an oscillator. Although computationally more efficient, the stored pulse train has a fixed spectral content, not a time-varying one as above.
67 </para>
68 </refsect1>
69
70 <refsect1>
71 <title>Examples</title>
72 <para>
73 Here is an example of the gbuzz opcode. It uses the file <ulink url="examples/gbuzz.csd"><citetitle>gbuzz.csd</citetitle></ulink>.
74
75 <example>
76 <title>Example of the gbuzz opcode.</title>
77 <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>
78 <xi:include href="examples-xml/gbuzz.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
79 </example>
80 </para>
81 </refsect1>
82
83 <refsect1>
84 <title>See Also</title>
85 <para>
86 <link linkend="SiggenDynamic"><citetitle>Dynamic Spectrum Oscillators</citetitle></link>
87 </para>
88 </refsect1>
89
90 <refsect1>
91 <title>Credits</title>
92 <para>September 2003. Thanks to &namekanata; for correcting the mentions of the <emphasis>kmul</emphasis> parameter.</para>
93 </refsect1>
94 </refentry>