Refactoring of Signal class by adding a rate class.
[Faustine.git] / interpretor / preprocessor / faust-0.9.47mr3 / examples / noisemetadata.dsp
1 <mdoc>
2 \title{<metadata>name</metadata>}
3 \author{<metadata>author</metadata>}
4 \date{\today}
5 \maketitle
6
7 \begin{tabular}{ll}
8 \hline
9 \textbf{name} & <metadata>name</metadata> \\
10 \textbf{version} & <metadata>version</metadata> \\
11 \textbf{author} & <metadata>author</metadata> \\
12 \textbf{license} & <metadata>license</metadata> \\
13 \textbf{copyright} & <metadata>copyright</metadata> \\
14 \hline
15 \end{tabular}
16 \bigskip
17 </mdoc>
18 //-----------------------------------------------------------------
19 // Noise generator and demo file for the Faust math documentation
20 //-----------------------------------------------------------------
21
22 declare name "NoiseMD"; // avoid same name as in noise.dsp
23 declare version "1.1";
24 declare author "Grame";
25 declare author "Yghe";
26 declare license "BSD";
27 declare copyright "(c)GRAME 2009";
28
29 <mdoc>
30 \section{Presentation of the "noise.dsp" Faust program}
31 This program describes a white noise generator with an interactive volume, using a random function.
32
33 \subsection{The random function}
34 </mdoc>
35
36 random = +(12345)~*(1103515245);
37
38 <mdoc>
39 The \texttt{random} function describes a generator of random numbers, which equation follows. You should notice hereby the use of an integer arithmetic on 32 bits, relying on integer wrapping for big numbers.
40 <equation>random</equation>
41
42 \subsection{The noise function}
43 </mdoc>
44
45 noise = random/2147483647.0;
46
47 <mdoc>
48 The white noise then corresponds to:
49 <equation>noise</equation>
50
51 \subsection{Just add a user interface element to play volume!}
52 </mdoc>
53
54 process = noise * vslider("Volume[style:knob]", 0, 0, 1, 0.1);
55
56 <mdoc>
57 Endly, the sound level of this program is controlled by a user slider, which gives the following equation:
58 <equation>process</equation>
59
60 \section{Block-diagram schema of process}
61 This process is illustrated on figure 1.
62 <diagram>process</diagram>
63
64 \section{Notice of this documentation}
65 You might be careful of certain information and naming conventions used in this documentation:
66 <notice />
67
68 \section{Listing of the input code}
69 The following listing shows the input Faust code, parsed to compile this mathematical documentation.
70 <listing mdoctags="false" dependencies="false" distributed="false" />
71 </mdoc>