<s>
FAUST	B-Language
(	O
Functional	O
AUdio	O
STream	O
)	O
is	O
a	O
domain-specific	B-Language
purely	B-Application
functional	I-Application
programming	I-Application
language	O
for	O
implementing	O
signal	O
processing	O
algorithms	O
in	O
the	O
form	O
of	O
libraries	B-Library
,	O
audio	B-Application
plug-ins	I-Application
,	O
or	O
standalone	O
applications	O
.	O
</s>
<s>
A	O
FAUST	B-Language
program	O
denotes	O
a	O
signal	B-General_Concept
processor	I-General_Concept
:	O
a	O
mathematical	O
function	O
that	O
is	O
applied	O
to	O
some	O
input	O
signal	O
and	O
then	O
fed	O
out	O
.	O
</s>
<s>
The	O
FAUST	B-Language
programming	O
model	O
combines	O
a	O
functional	B-Language
programming	I-Language
approach	O
with	O
a	O
block	B-Application
diagram	I-Application
syntax	O
:	O
</s>
<s>
The	O
functional	B-Language
programming	I-Language
approach	O
provides	O
a	O
natural	O
framework	O
for	O
signal	O
processing	O
.	O
</s>
<s>
Digital	O
signals	O
are	O
modeled	O
as	O
discrete	O
functions	O
of	O
time	O
,	O
signal	O
processors	O
as	O
second	B-Language
order	I-Language
functions	I-Language
that	O
operate	O
on	O
them	O
,	O
and	O
FAUST	B-Language
’s	O
block	B-Application
diagram	I-Application
composition	B-Application
operators	O
,	O
used	O
to	O
combine	O
signal	O
processors	O
together	O
,	O
as	O
third	O
order	O
functions	O
,	O
etc	O
.	O
</s>
<s>
Block	B-Application
diagrams	I-Application
,	O
even	O
if	O
purely	O
textual	O
as	O
in	O
FAUST	B-Language
,	O
promote	O
a	O
modular	O
approach	O
to	O
signal	O
processing	O
that	O
complies	O
with	O
sound	O
engineers	O
 '	O
and	O
audio	O
developers	O
 '	O
habits	O
.	O
</s>
<s>
A	O
FAUST	B-Language
program	O
does	O
n’t	O
describe	O
a	O
sound	O
or	O
a	O
group	O
of	O
sounds	O
,	O
but	O
a	O
signal	B-General_Concept
processor	I-General_Concept
.	O
</s>
<s>
The	O
program	O
source	O
is	O
organized	O
as	O
a	O
set	O
of	O
definitions	O
with	O
at	O
least	O
the	O
definition	O
of	O
the	O
keyword	O
process	O
(	O
the	O
equivalent	O
of	O
main	O
in	O
C	B-Language
)	O
:	O
</s>
<s>
The	O
FAUST	B-Language
compiler	B-Language
translates	O
FAUST	B-Language
code	O
into	O
a	O
C++	B-Language
object	B-Language
,	O
which	O
may	O
then	O
interface	O
with	O
other	O
C++	B-Language
code	I-Language
to	O
produce	O
a	O
full	O
program	O
.	O
</s>
<s>
It	O
is	O
therefore	O
suited	O
to	O
implement	O
low-level	O
DSP	B-General_Concept
functions	O
like	O
recursive	O
filters	O
.	O
</s>
<s>
The	O
code	O
may	O
also	O
be	O
embedded	B-Application
.	O
</s>
<s>
It	O
is	O
self-contained	O
and	O
does	O
not	O
depend	O
on	O
any	O
DSP	B-General_Concept
library	O
or	O
runtime	B-Device
system	I-Device
.	O
</s>
<s>
The	O
semantics	O
of	O
FAUST	B-Language
is	O
driven	O
to	O
be	O
simple	O
and	O
well-defined	O
.	O
</s>
<s>
It	O
allows	O
the	O
FAUST	B-Language
compiler	B-Language
to	O
be	O
semantically	O
driven	O
.	O
</s>
<s>
Instead	O
of	O
compiling	B-Language
a	O
program	O
literally	O
,	O
it	O
compiles	B-Language
the	O
mathematical	O
function	O
it	O
denotes	O
.	O
</s>
<s>
Moreover	O
,	O
having	O
access	O
to	O
the	O
exact	O
semantics	O
of	O
a	O
FAUST	B-Language
program	O
can	O
simplify	O
preservation	O
issues	O
.	O
</s>
<s>
FAUST	B-Language
is	O
a	O
textual	O
language	O
but	O
block	B-Application
diagram	I-Application
oriented	O
.	O
</s>
<s>
It	O
combines	O
two	O
approaches	O
:	O
functional	B-Language
programming	I-Language
and	O
algebraic	O
block	B-Application
diagrams	I-Application
,	O
which	O
are	O
constructed	O
via	O
function	B-Application
composition	I-Application
.	O
</s>
<s>
For	O
that	O
,	O
FAUST	B-Language
relies	O
on	O
a	O
block	B-Application
diagram	I-Application
algebra	O
of	O
five	O
composition	B-Application
operations	O
.	O
</s>
<s>
FAUST	B-Language
programs	O
define	O
a	O
process	O
function	O
that	O
operates	O
on	O
incoming	O
data	O
.	O
</s>
<s>
Most	O
FAUST	B-Language
primitives	O
are	O
analogous	O
to	O
their	O
C	B-Language
counterpart	O
on	O
numbers	O
,	O
but	O
lifted	O
to	O
signals	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
FAUST	B-Language
primitive	O
sin	O
operates	O
on	O
a	O
signal	O
X	O
by	O
applying	O
the	O
C	B-Language
function	O
sin	O
to	O
each	O
sample	O
X[t]	O
.	O
</s>
<s>
All	O
C	B-Language
numerical	O
functions	O
have	O
their	O
counterpart	O
in	O
FAUST	B-Language
.	O
</s>
<s>
Some	O
signal	O
processing	O
primitives	O
are	O
specific	O
to	O
FAUST	B-Language
.	O
</s>
<s>
Contrary	O
to	O
Max-like	B-Application
visual	B-Language
programming	I-Language
languages	I-Language
where	O
the	O
user	O
does	O
manual	O
connections	O
,	O
FAUST	B-Language
primitives	O
are	O
assembled	O
in	O
block	B-Application
diagrams	I-Application
by	O
using	O
a	O
set	O
of	O
high-level	O
block	B-Application
diagram	I-Application
composition	B-Application
operations	O
.	O
</s>
<s>
Using	O
the	O
sequential	O
composition	B-Application
operator	O
:	O
the	O
output	O
of	O
+	O
can	O
be	O
routed	O
to	O
the	O
input	O
of	O
abs	O
to	O
compute	O
the	O
absolute	O
value	O
of	O
the	O
signal	O
:	O
</s>
<s>
Here	O
is	O
an	O
example	O
of	O
parallel	O
composition	B-Application
using	O
the	O
,	O
operator	O
that	O
arranges	O
its	O
left	O
and	O
right	O
expressions	O
in	O
parallel	O
.	O
</s>
<s>
The	O
above	O
may	O
be	O
rewritten	O
in	O
curried	B-Application
form	I-Application
:	O
</s>
<s>
The	O
recursive	O
composition	B-Application
operator	O
~	O
can	O
be	O
used	O
to	O
create	O
block	B-Application
diagrams	I-Application
with	O
cycles	O
(	O
that	O
include	O
an	O
implicit	O
one-sample	O
delay	O
)	O
.	O
</s>
<s>
Using	O
specific	O
architecture	O
files	O
,	O
a	O
FAUST	B-Language
program	O
can	O
be	O
used	O
to	O
produce	O
code	O
for	O
a	O
variety	O
of	O
platforms	O
and	O
plug-in	O
formats	O
.	O
</s>
<s>
A	O
useful	O
option	O
makes	O
it	O
possible	O
to	O
generate	O
the	O
block	B-Application
diagram	I-Application
representation	O
of	O
the	O
program	O
as	O
one	O
or	O
more	O
SVG	O
graphic	O
files	O
.	O
</s>
<s>
It	O
is	O
useful	O
to	O
note	O
the	O
difference	O
between	O
the	O
block	B-Application
diagram	I-Application
and	O
the	O
generated	O
C++	B-Language
code	I-Language
.	O
</s>
<s>
As	O
stated	O
,	O
the	O
key	O
idea	O
here	O
is	O
not	O
to	O
compile	B-Language
the	O
block	B-Application
diagram	I-Application
literally	O
,	O
but	O
the	O
mathematical	O
function	O
it	O
denotes	O
.	O
</s>
<s>
Modern	O
C/C	O
++	O
compilers	B-Language
also	O
do	O
n’t	O
compile	B-Language
programs	O
literally	O
.	O
</s>
<s>
But	O
because	O
of	O
the	O
complex	O
semantics	O
of	O
C/C	O
++	O
(	O
due	O
to	O
side	O
effects	O
,	O
pointer	O
aliasing	O
,	O
etc	O
.	O
)	O
</s>
<s>
This	O
is	O
a	O
distinct	O
advantage	O
of	O
a	O
purely	B-Application
functional	I-Application
language	O
:	O
it	O
allows	O
compilers	B-Language
to	O
do	O
very	O
advanced	O
optimisations	O
.	O
</s>
<s>
The	O
Faust	B-Language
semantics	O
is	O
almost	O
the	O
same	O
as	O
that	O
of	O
Haskell	B-Language
's	I-Language
Arrows	B-Application
type	O
class	O
.	O
</s>
<s>
The	O
Arrow	O
combinators	O
are	O
more	O
restrictive	O
than	O
their	O
FAUST	B-Language
counterparts	O
,	O
e.g.	O
,	O
the	O
nesting	O
of	O
parallel	O
composition	B-Application
is	O
preserved	O
,	O
and	O
inputs	O
of	O
the	O
operands	O
of	O
&&&	O
must	O
match	O
exactly	O
.	O
</s>
