blob: 0e7471723ccf7325faffba6918a1f29bf741daf7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
<refentry id="noise">
<indexterm id="IndexNoise"><primary>noise</primary></indexterm>
<refentryinfo><title>Signal Generators:Random (Noise) Generators</title></refentryinfo>
<refmeta>
<refentrytitle>noise</refentrytitle>
</refmeta>
<refnamediv>
<refname>noise</refname>
<refpurpose>
A white noise generator with an IIR lowpass filter.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
A white noise generator with an IIR lowpass filter.
</para>
</refsect1>
<refsect1>
<title>Syntax</title>
<synopsis>ares <command>noise</command> xamp, kbeta</synopsis>
</refsect1>
<!-- <refsect1>
<title>Initialization</title>
</refsect1>-->
<refsect1>
<title>Performance</title>
<para>
<emphasis>xamp</emphasis> -- amplitude of final output
</para>
<para>
<emphasis>kbeta</emphasis> -- beta of the lowpass filter. Should be in the range of -1 to 1.
</para>
<para>
The filter equation is:
<mediaobject>
<imageobject>
<imagedata fileref="images/noise-filter.png" format="PNG"/>
</imageobject>
<textobject>
<phrase>[Filter equation for filter in noise opcode.]</phrase>
</textobject>
<!-- <caption>
<para>A diagram showing the Poisson distribution.</para>
</caption>-->
</mediaobject>
where <emphasis>x<subscript>n</subscript></emphasis> is the original white noise and <emphasis>y<subscript>n</subscript></emphasis> is lowpass filtered noise. The higher β is, the lower the filter's cut-off frequency. The cutoff frequency is roughly sr * ((1-kbeta)/2).
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<para>
Here is an example of the noise opcode. It uses the file <ulink url="examples/noise.csd"><citetitle>noise.csd</citetitle></ulink>.
<example>
<title>Example of the noise opcode.</title>
<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>
<xi:include href="examples-xml/noise.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
</para>
<para>
Here is an example of the noise opcode controlling the kbeta parameter with a GUI interface. It uses the file <ulink url="examples/noise-2.csd"><citetitle>noise-2.csd</citetitle></ulink>.
<example>
<title>Example of the noise opcode controlled with a GUI.</title>
<xi:include href="examples-xml/noise-2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
</para>
</refsect1>
<refsect1>
<title>Credits</title>
<para>
<simplelist>
<member>Author: &namejohn;</member>
<member>University of Bath, Codemist. Ltd.</member>
<member>Bath, UK</member>
<member>December 2000</member>
</simplelist>
</para>
<para>Example written by &namekevin;.</para>
<para>New in Csound version 4.10</para>
</refsect1>
</refentry>
|