1 %% This documentation was generated with Faust version 0.9.58
2 %% Thu Jun 13 10:45:16 2013
3 %% http://faust.grame.fr
5 \documentclass{article
}
7 \usepackage[utf8
]{inputenc}
9 \usepackage[usenames
]{color}
11 \usepackage{supertabular
}
13 \usepackage{latexsym, amssymb
}
17 \setlength{\parindent}{0pt
}
19 % Make LaTeX output a dot when typing an asterisk
20 \DeclareMathSymbol{*
}{\mathbin}{symbols
}{"
01}
23 \definecolor{yobg
}{rgb
}{0.9,
0.9,
1}
24 \definecolor{yotxt
}{rgb
}{0.01,
0.01,
0.52} % a dark blue.
25 \definecolor{mylstbg
}{rgb
}{0.98,
0.98,
0.98} % a really pale grey.
26 \definecolor{mylstcmt
}{rgb
}{0.01,
0.52,
0.01} % a dark green.
27 \definecolor{mylstdoc
}{rgb
}{0.80,
0.30,
0.80} % a medium pink.
35 numberstyle=
\tiny\ttfamily,
36 backgroundcolor=
\color{mylstbg
},
37 basicstyle=
\scriptsize\ttfamily,
38 commentstyle=
\slshape\color{mylstcmt
},
%\itshape,
40 columns=flexible,
%fixed,
41 showstringspaces=false,
62 emph=
{component, declare, environment, import, library, process
},
63 emph=
{[2]ffunction, fconstant, fvariable
},
64 emph=
{[3]button, checkbox, vslider, hslider, nentry, vgroup, hgroup, tgroup, vbargraph, hbargraph, attach
},
65 emphstyle=
\color{yotxt
},
%\underline, %\bfseries,
66 morecomment=
[s
][\color{mylstdoc
}]{<mdoc>
}{</mdoc>
},
67 rulecolor=
\color{black
}
70 \newcommand{\faustfilename}{/home/wang/Documents/OcamlProjects/interpreter/interpreter11/dsp_files/make_init.dsp
}
71 \newcommand{\faustdocdir}{make_init-mdoc
}
72 \newcommand{\faustprogname}{make_init
}
73 \newcommand{\faustversion}{0.9.58}
74 \newcommand{\faustdocdate}{June
13,
2013}
82 This
document provides a mathematical description of the Faust program text stored in the
\texttt{\faustfilename} file. See the notice in Section\,
\ref{notice
} (page\,
\pageref{notice
}) for details.
85 \section{Mathematical definition of
\texttt{process
}}
88 The
\emph{\faustprogname} program evaluates the signal transformer denoted by
\texttt{process
}, which is mathematically defined as follows:
90 % Set of Faust formulas (corresponding to an <equation> tag).
93 \item Output signal $y$ such that
100 \item Input signal (none)
102 \item Intermediate signals $r_i$ for $i
\in [1,
2]$, $q_1$ and $m_1$ such that
108 r_
{1}(t) =
2.000001 + q_
{1}(t)
114 \left\
{\begin{array
}{ll
}
115 2 &
\mbox{if \,
} \mathrm{int
}\left(m_
{1}(t)
\right) =
0\\
116 r_
{1}(t\!-\!
1) &
\mbox{if \,
} \mathrm{int
}\left(m_
{1}(t)
\right) =
1
122 \left\
{\begin{array
}{ll
}
123 0 &
\mbox{, when \,
} t =
0\\
124 r_
{2}(t\!-\!
1) &
\mbox{, when \,
} t >
0
131 \section{Block diagram of
\texttt{process
}}
134 The block diagram of
\texttt{process
} is shown on Figure\,
\ref{figure1
} (page\,
\pageref{figure1
}).
137 \includegraphics[width=
\textwidth]{../svg/svg-
01/process
}
138 \caption{Block diagram of
\texttt{process
}}
148 \item This
document was generated using Faust version
\faustversion\ on
\faustdocdate.
149 \item The value of a Faust program is the result of applying the signal transformer denoted by the expression to which the
\texttt{process
} identifier is bound to input signals, running at the $f_S$ sampling frequency.
150 \item Faust (
\emph{Functional Audio Stream
}) is a functional programming language designed for synchronous real-time signal processing and synthesis applications. A Faust program is a set of bindings of identifiers to expressions that denote signal transformers. A signal $s$ in $S$ is a function mapping
\footnote{Faust assumes that $
\forall \, s
\in S,
\forall \, t
\in \mathbb{Z
}, s(t) =
0 \mathrm{\ when\
} t <
0$.
} times $t
\in \mathbb{Z
}$ to values $s(t)
\in \mathbb{R
}$, while a signal transformer is a function from $S^n$ to $S^m$, where $n,m
\in \mathbb{N
}$. See the Faust manual for additional information (
\textsf{http://faust.grame.fr
}).
151 \item Every mathematical formula derived from a Faust expression is assumed, in this
document, to having been normalized (in an implementation-depen\-dent manner) by the Faust compiler.
152 \item A block diagram is a graphical representation of the Faust binding of an identifier I to an expression E; each graph is put in a box labeled by I. Subexpressions of E are recursively displayed as long as the whole picture fits in one page.
153 \item $
\forall \, x
\in \mathbb{R
}$,
156 \left\
{\begin{array
}{cl
}
157 \lfloor x
\rfloor &
\mbox{if \,
} x >
0 \\
158 \lceil x
\rceil &
\mbox{if \,
} x <
0 \\
159 0 &
\mbox{if \,
} x =
0 \\
162 \item The
\texttt{\faustdocdir/
} directory may also include the following subdirectories:
164 \item \texttt{cpp/
} for Faust compiled code;
165 \item \texttt{pdf/
} which contains this
document;
166 \item \texttt{src/
} for all Faust sources used (even libraries);
167 \item \texttt{svg/
} for block diagrams, encoded using the Scalable Vector Graphics format (
\textsf{http://www.w3.org/Graphics/SVG/
});
168 \item \texttt{tex/
} for the
\LaTeX\ source of this
document.
173 \section{Faust code listing
}
176 This section provides the listing of the Faust code used to generate this
document.
179 \begin{lstlisting
}[caption=
\texttt{make_init.dsp
}]
180 rec(a, b, i) = a ~ (i : b);
183 ((y, z)) => vect0(y) : vect0(z);
188 ((x,y)) => init_value(x) : vect0(y);
193 make_init(x) = (
0,
1 : prefix), init_value(x), _ : select2;
197 //B = serialize : _,
2 : vectorize;
200 //process = _,_ : > ;
202 //process = (
0.000001,
2 : +) : rec(A,B,I);
204 process =
0.0000010000000000,
2:+:+~((
0,
1:prefix),(
0:_,
2:+),_:select2:_);