| 1 |
|
| 2 |
<refentry id="fog"> |
| 3 |
<indexterm id="IndexFog"><primary>fog</primary></indexterm> |
| 4 |
<refentryinfo><title>Signal Generators:Granular Synthesis</title></refentryinfo> |
| 5 |
<refmeta> |
| 6 |
<refentrytitle>fog</refentrytitle> |
| 7 |
</refmeta> |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
<refnamediv> |
| 12 |
<refname>fog</refname> |
| 13 |
<refpurpose> |
| 14 |
Audio output is a succession of grains derived from data in a stored function table |
| 15 |
</refpurpose> |
| 16 |
</refnamediv> |
| 17 |
|
| 18 |
<refsect1> |
| 19 |
<title>Description</title> |
| 20 |
<para> |
| 21 |
Audio output is a succession of grains derived from data in a stored function table <emphasis>ifna</emphasis>. The local envelope of these grains and their timing is based on the model of <emphasis>fof</emphasis> synthesis and permits detailed control of the granular synthesis. |
| 22 |
</para> |
| 23 |
</refsect1> |
| 24 |
|
| 25 |
<refsect1> |
| 26 |
<title>Syntax</title> |
| 27 |
<synopsis>ares <command>fog</command> xamp, xdens, xtrans, aspd, koct, kband, kris, kdur, kdec, \ |
| 28 |
iolaps, ifna, ifnb, itotdur [, iphs] [, itmode] [, iskip]</synopsis> |
| 29 |
</refsect1> |
| 30 |
|
| 31 |
<refsect1> |
| 32 |
<title>Initialization</title> |
| 33 |
<para> |
| 34 |
<emphasis>iolaps</emphasis> -- number of pre-located spaces needed to hold overlapping grain data. Overlaps are density dependent, and the space required depends on the maximum value of <emphasis>xdens</emphasis> * <emphasis>kdur</emphasis>. Can be over-estimated at no computation cost. Uses less than 50 bytes of memory per <emphasis>iolap</emphasis>. |
| 35 |
</para> |
| 36 |
|
| 37 |
<para> |
| 38 |
<emphasis>ifna</emphasis>, <emphasis>ifnb</emphasis> -- table numbers of two stored functions. The first is the data used for granulation, usually from a soundfile (<link linkend="GEN01"><citetitle>GEN01</citetitle></link>). The second is a rise shape, used forwards and backwards to shape the grain rise and decay; this is normally a sigmoid (<link linkend="GEN19"><citetitle>GEN19</citetitle></link>) but may be linear (<link linkend="GEN05"><citetitle>GEN05</citetitle></link>). |
| 39 |
</para> |
| 40 |
|
| 41 |
<para> |
| 42 |
<emphasis>itotdur</emphasis> -- total time during which this <emphasis>fog</emphasis> will be active. Normally set to p3. No new grain is created if it cannot complete its <emphasis>kdur</emphasis> within the remaining <emphasis>itotdur</emphasis>. |
| 43 |
</para> |
| 44 |
|
| 45 |
<para> |
| 46 |
<emphasis>iphs</emphasis> (optional) -- initial phase of the fundamental, expressed as a fraction of a cycle (0 to 1). The default value is 0. |
| 47 |
</para> |
| 48 |
|
| 49 |
<para> |
| 50 |
<emphasis>itmode</emphasis> (optional) -- transposition mode. If zero, each grain keeps the <emphasis>xtrans</emphasis> value it was launched with. If non-zero, each is influenced by <emphasis>xtrans</emphasis> continuously. The default value is 0. |
| 51 |
</para> |
| 52 |
|
| 53 |
<para> |
| 54 |
<emphasis>iskip</emphasis> (optional, default=0) -- If non-zero, skip initialization (allows legato use). |
| 55 |
</para> |
| 56 |
</refsect1> |
| 57 |
|
| 58 |
<refsect1> |
| 59 |
<title>Performance</title> |
| 60 |
<para> |
| 61 |
<emphasis>xamp</emphasis> -- amplitude factor. Amplitude is also dependent on the number of overlapping grains, the interaction of the rise shape (<emphasis>ifnb</emphasis>) and the exponential decay (<emphasis>kband</emphasis>), and the scaling of the grain waveform (<emphasis>ifna</emphasis>). The actual amplitude may therefore exceed <emphasis>xamp</emphasis>. |
| 62 |
</para> |
| 63 |
|
| 64 |
<para> |
| 65 |
<emphasis>xdens</emphasis> -- density. The frequency of grains per second. |
| 66 |
</para> |
| 67 |
|
| 68 |
<para> |
| 69 |
<emphasis>xtrans</emphasis> -- transposition factor. The rate at which data from the stored function table <emphasis>ifna</emphasis> is read within each grain. This has the effect of transposing the original material. A value of 1 produces the original pitch. Higher values transpose upwards, lower values downwards. Negative values result in the function table being read backwards. |
| 70 |
</para> |
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
<para> |
| 76 |
<emphasis>aspd</emphasis> -- Starting index pointer. <emphasis>aspd</emphasis> is the normalized index (0 to 1) to table <emphasis>ifna</emphasis> that determines the movement of a pointer used as the starting point for reading data within each grain. (<emphasis>xtrans</emphasis> determines the rate at which data is read starting from this pointer.) |
| 77 |
</para> |
| 78 |
|
| 79 |
<para> |
| 80 |
<emphasis>koct</emphasis> -- octaviation index. The operation of this parameter is identical to that in <link linkend="fof"><citetitle>fof</citetitle></link>. |
| 81 |
</para> |
| 82 |
|
| 83 |
<para> |
| 84 |
<emphasis>kband</emphasis>, <emphasis>kris</emphasis>, <emphasis>kdur</emphasis>, <emphasis>kdec</emphasis> -- grain envelope shape. These parameters determine the exponential decay (<emphasis>kband</emphasis>), and the rise (<emphasis>kris</emphasis>), overall duration (<emphasis>kdur</emphasis>,) and decay (<emphasis>kdec</emphasis> ) times of the grain envelope. Their operation is identical to that of the local envelope parameters in <emphasis>fof</emphasis>. |
| 85 |
</para> |
| 86 |
|
| 87 |
</refsect1> |
| 88 |
|
| 89 |
<refsect1> |
| 90 |
<title>Examples</title> |
| 91 |
<para> |
| 92 |
Here is an example of the fog opcode. It uses the file <ulink url="examples/fog.csd"><citetitle>fog.csd</citetitle></ulink>. |
| 93 |
|
| 94 |
<example> |
| 95 |
<title>Example of the fog opcode.</title> |
| 96 |
|
| 97 |
<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> |
| 98 |
<xi:include href="examples-xml/fog.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 99 |
</example> |
| 100 |
</para> |
| 101 |
</refsect1> |
| 102 |
|
| 103 |
<refsect1> |
| 104 |
<title>See Also</title> |
| 105 |
<para> |
| 106 |
<link linkend="SiggenGranular"><citetitle>Granular Synthesis</citetitle></link> |
| 107 |
</para> |
| 108 |
</refsect1> |
| 109 |
|
| 110 |
<refsect1> |
| 111 |
<title>Credits</title> |
| 112 |
<para> |
| 113 |
<simplelist> |
| 114 |
<member>Author: Michael Clark</member> |
| 115 |
<member>Huddersfield</member> |
| 116 |
<member>May 1997</member> |
| 117 |
</simplelist> |
| 118 |
</para> |
| 119 |
|
| 120 |
<para>New in version 3.46</para> |
| 121 |
<para> |
| 122 |
The Csound fog generator is by Michael Clarke, extending his earlier work based on IRCAM's FOF algorithm. |
| 123 |
</para> |
| 124 |
<para>Added notes by &namerasmus; on September 2002.</para> |
| 125 |
</refsect1> |
| 126 |
</refentry> |