| 1 | |
| 2 | <refentry id="buzz"> |
| 3 | <indexterm id="IndexBuzz"><primary>buzz</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Dynamic Spectrum Oscillators</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>buzz</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>buzz</refname> |
| 11 | <refpurpose> |
| 12 | Output is a set of harmonically related sine partials. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Output is a set of harmonically related sine partials. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis>ares <command>buzz</command> xamp, xcps, knh, 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 sine 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 | <emphasis>xamp</emphasis> -- amplitude |
| 43 | </para> |
| 44 | |
| 45 | <para> |
| 46 | <emphasis>xcps</emphasis> -- frequency in cycles per second |
| 47 | </para> |
| 48 | |
| 49 | <para> |
| 50 | The <emphasis>buzz</emphasis> 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: |
| 51 | </para> |
| 52 | |
| 53 | <para> |
| 54 | <emphasis>knh</emphasis> -- total number of harmonics requested. New in Csound version 3.57, <emphasis>knh</emphasis> defaults to one. If <emphasis>knh</emphasis> is negative, the absolute value is used. |
| 55 | </para> |
| 56 | |
| 57 | <para> |
| 58 | <emphasis>buzz</emphasis> and <link linkend="gbuzz"><citetitle>gbuzz</citetitle></link> 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 <emphasis>knh</emphasis> may be varied during performance, its internal value is necessarily integer and may cause <quote>pops</quote> due to discontinuities in the output. <emphasis>buzz</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 buzz opcode. It uses the file <ulink url="examples/buzz.csd"><citetitle>buzz.csd</citetitle></ulink>. |
| 74 | |
| 75 | <example> |
| 76 | <title>Example of the buzz 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/buzz.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 79 | </example> |
| 80 | <para> |
| 81 | A musical example featuring the buzz opcode: <ulink url="examples/musical/BuzzFof_Cucchi.csd"><citetitle>BuzzFof_Cucchi.csd</citetitle></ulink> by Stefano Cucchi. |
| 82 | </para> |
| 83 | </para> |
| 84 | </refsect1> |
| 85 | |
| 86 | <refsect1> |
| 87 | <title>See Also</title> |
| 88 | <para> |
| 89 | <link linkend="SiggenDynamic"><citetitle>Dynamic Spectrum Oscillators</citetitle></link> |
| 90 | </para> |
| 91 | </refsect1> |
| 92 | |
| 93 | <refsect1> |
| 94 | <title>Credits</title> |
| 95 | <para>September 2003. Thanks to &namekanata; for correcting the mentions of the <emphasis>kmul</emphasis> parameter.</para> |
| 96 | </refsect1> |
| 97 | </refentry> |