Merge branch 'master' of https://scm.cri.ensmp.fr/git/Faustine
[Faustine.git] / doc / user-manual-src / faustine-user-manual.tex
diff --git a/doc/user-manual-src/faustine-user-manual.tex b/doc/user-manual-src/faustine-user-manual.tex
new file mode 100644 (file)
index 0000000..679d027
--- /dev/null
@@ -0,0 +1,241 @@
+\documentclass[a4paper,12pt]{book}
+
+%\usepackage{latexsym, amssymb}
+\usepackage{latexsym}
+\usepackage{graphicx}
+%\usepackage{longtable}
+%\usepackage{supertabular}
+%\usepackage{tabularx}
+%\usepackage{tabulary}
+\usepackage{xspace}
+\usepackage{pdfpages}
+%\usepackage[rounded]{syntax}
+\usepackage{hyperref} 
+\usepackage{listings}
+%\usepackage[usenames,dvipsnames]{color} 
+
+%\usepackage[cc]{titlepic}
+\usepackage{sectsty}
+% \usepackage{times}
+%\usepackage[urw-garamond]{mathdesign}
+\usepackage{fncychap}
+\usepackage{fancyhdr}
+
+\usepackage{rail}
+\railoptions{-t -h}
+
+\fancyhead{} % clear all header fields
+\fancyheadoffset[LE,RO]{\marginparsep+\marginparwidth}
+\fancyhead[RO,LE]{\thepage}
+\fancyhead[LO]{\rightmark}
+\fancyhead[RE]{\leftmark}
+\renewcommand{\headrulewidth}{0.1pt}
+
+\fancyfoot{}
+
+
+\hypersetup{%
+            colorlinks = true, %true, false
+            linkcolor = black,
+            citecolor = blue,
+            urlcolor = blue,
+}
+\urlstyle{sf} %rm
+\newcommand{\myurl}[1]{\textcolor{blue}{\underbar{\url{#1}}}}
+
+%%% MY COLORS
+\definecolor{yoheader}{rgb}{0.71,0.01,0.0}
+
+%%%% margin par
+\definecolor{margincolor}{rgb}{0.52,0.02,0.02} % grey red.
+\definecolor{yobg}{rgb}{0.9,0.9,1}
+\definecolor{yotxt}{rgb}{0.01,0.01,0.52}
+\definecolor{mylstcmt}{rgb}{0.01,0.52,0.01} % a dark green.
+%\definecolor{mylstdoc}{rgb}{0.60,0.60,0.60} % a medium grey.
+\definecolor{mylstdoc}{rgb}{0.80,0.30,0.80} % a medium pink.
+%\definecolor{mylsteqn}{rgb}{0.80,0.80,0.30} % a medium pink.
+\definecolor{mylstkey}{rgb}{0.52,0.01,0.01} % a dark red.
+%%\newcommand{\farg}[1]{\textrm{\textit{#1}}}
+
+\setlength{\marginparwidth}{1.2in}
+\let\oldmarginpar\marginpar
+\renewcommand\marginpar[1]{\-\oldmarginpar[\raggedleft\color{margincolor}\footnotesize #1]%
+{\raggedright\color{margincolor}\footnotesize #1}}
+
+
+
+% \relax
+
+\begin{document} 
+\ChRuleWidth{1pt}
+% \ChNumVar{\raggedleft\fontsize{80}{82}\sffamily\bfseries\color{yoheader}}
+\ChNumVar{\raggedleft\Huge\color{yoheader}}
+%\ChTitleVar{\raggedleft\fontsize{60}{62}\sffamily\it\color{yoheader}}
+\ChTitleVar{\raggedleft\sffamily\fontsize{30}{32}\bf\color{yoheader}}
+
+%\chapterfont{\sffamily\color{yoheader}}
+%\sectionfont{\sffamily\color{yoheader}}
+%\subsectionfont{\sffamily\color{yoheader}}
+%\subsubsectionfont{\sffamily\color{yoheader}}
+
+\chapterfont{\color{yoheader}}
+\sectionfont{\color{yoheader}}
+\subsectionfont{\color{yoheader}}
+\subsubsectionfont{\color{yoheader}}
+
+
+% parameters for listings
+\lstset{
+  tabsize=4,
+  showspaces=false,
+  showstringspaces=false,
+  language=C++, 
+  basicstyle=\ttfamily\color{yotxt},
+  numbers=none,
+  stepnumber=2,
+  commentstyle=\slshape\color{mylstcmt},
+  breaklines=true, 
+  emph={component, declare, environment, import, library, process},
+  emph={[2]ffunction, fconstant, fvariable},
+  emph={[3]button, checkbox, vslider, hslider, nentry, vgroup, hgroup, tgroup, vbargraph, hbargraph, attach},
+  emphstyle=\color{mylstkey},
+%  morecomment=[s][\color{mylsteqn}]{<equation>}{</equation>},
+  morecomment=[s][\color{mylstdoc}]{<mdoc>}{</mdoc>},
+  %% frame=single,
+  backgroundcolor=\color{yobg},
+  captionpos=b
+}
+
+\lstloadlanguages{C++,[LaTeX]TeX}
+
+% \titlepic{
+%   \includegraphics[width=15cm]{images/bandeau-faust}
+% }
+\title{\Huge\color{yoheader}\faustine User Manual%\\\Large(version 0.9.29)
+}
+\author{CRI -- \textsc{Mines} ParisTech\\Centre de Recherche en Informatique}
+\date{September 2013}
+
+
+\railalias{recur}{$\sim$}
+\railalias{lbrace}{\{}
+\railalias{rbrace}{\}}
+\railalias{dollar}{\$}
+\railalias{mod}{\%}
+\railalias{arobase}{@}
+\railalias{ampersand}{\&}
+\railalias{hat}{$\land$}
+\railalias{kot}{'}
+\railalias{pipe}{$|$}
+\railalias{fdelay}{}
+\railalias{backslash}{\char"5C}
+\railterm{recur,lbrace,rbrace,dollar,mod,kot,arobase,ampersand,backslash,fdelay, pipe, hat}
+
+\newcommand{\farg}[1]{\textrm{\textit{#1}}}
+\newcommand{\ldbrack}{[\![ \,}
+\newcommand{\rdbrack}{\, ]\!] }
+\newcommand{\rdbrackC}{\rdbrack_{\mathrm{C}}\,}
+\newcommand{\dbrack}[1]{\ldbrack #1 \rdbrack}
+\newcommand{\semantic}[1]{\ldbrack #1 \rdbrack}
+\newcommand{\dbrackC}[1]{\ldbrack #1 \rdbrackC}
+
+\newcommand{\faust}{\textsc{Faust}\xspace}
+\newcommand{\faustine}{\textsc{Faustine}\xspace}
+\newcommand{\latex}{\LaTeX\xspace}
+\newcommand{\ircam}{\textsc{Ircam}\xspace}
+\newcommand{\astree}{\textsc{Astree}\xspace}
+\newcommand{\svg}{\textsc{Svg}\xspace}
+
+
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
+
+\maketitle
+
+\tableofcontents
+
+\chapter{Introduction}
+
+\faustine is an interpreter for multi-rate and vector exented \faust programs testing, written in OCaml, at CRI of MINES ParisTech, and covered by the GNU Public License V3 (see LICENSE.txt).
+
+\faust (\textit{Functional Audio Stream}) is a functional programming language specifically designed for real-time signal processing and synthesis.  \faust targets high-performance signal processing applications and audio plug-ins for a variety of platforms and standards. 
+
+\section{Design Principles} 
+
+Various principles have guided the design of \faustine:
+
+\begin{itemize}
+
+\item \faustine is a \textit{test bed} interpreter for faust programs, especially for vector extension. It aims at providing a framework to test \textit{vector} and \textit{multi-rate} ideas quite easily, without having to deal with the burdens of the compiler. \faustine is written in OCaml. 
+
+\item \faustine programs are interpreted upon \faust language and extensions, onto input files (wav or csv), and producing output files (also wav or csv). The interpreter relies on a \faust preprocessor to translate \faust programs into equivalent flatten programs containing only core \faust functions except GUI ones.
+
+\item In most cases, \faustine is inefficient but, still, it often allows to get a idea of time consumption location.
+
+\item \faustine depends on g++ and ocamlopt compilers. It embeds libsndfile and a slighlty modified version of libsndfile-ocaml. 
+
+\item For the moment, \faustine only handles dynamic type-checking but future work should address static type-checking.  
+
+\item \faustine current extension supports four multirate and vector functions: \lstinline'vectorize', \lstinline'serialize', \lstinline'[ ]' (pick vector element), and \lstinline'#' (concatenate two vector elements).
+
+\item So far, several vector libraries have been developed: complex.lib, fft.lib, fft2d.lib and morpho.lib.
+
+\end{itemize}
+
+\chapter{Compiling and installing \faustine}
+
+\faustine's git repository can be cloned calling:
+
+\begin{lstlisting}
+        git clone https://scm.cri.ensmp.fr/git/Faustine.git
+\end{lstlisting}
+
+
+\section{Organization of the distribution}
+
+\faustine directory should contain the following elements:
+
+\begin{tabular}{ll}
+  benchmarks/ &          benchmark result files\\
+  Changes.txt &          what's new with each release\\
+  configure       &      compilation configuration script\\
+  examples/      &       vector examples (fft, image processing...)\\
+  INSTALL.txt    &       Faustine installation instructions\\
+  interpreter/    &      Faustine's interpreter source code\\
+  lib/               &   library files in Faustine (fft.lib, morpho.lib...)\\
+  LICENSE.txt  &         license and copyright notice\\
+  Makefile           &   main Makefile to compile and install\\
+  README.txt      &      this file\\
+\end{tabular}
+
+\section{Compiling and Installing}
+\faustine has no dependencies outside standard libraries, except OCaml and g++ compilers and 'make'-like standard commands. Therefore the compilation should be straightforward. Configure is necessary for libsndfile embedded library. To compile the \faustine interpreter do:
+\begin{lstlisting}
+       cd Faustine/
+       ./configure
+       make
+       sudo make install
+\end{lstlisting}
+
+If the compilation was successful you can test the interpreter before installing it:
+\begin{lstlisting}
+       make test
+\end{lstlisting}
+
+
+\chapter{How to use \faustine}
+
+
+
+\chapter{How to maintain and extend \faustine}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                      END                                              %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\end{document}