FAUST is a *functional programming language* [6].
Each function specifies a *block diagram* having some number of
input and output signals, all streaming at the same sampling rate,
starting at time 0. Five *block-diagram operators*
(§2.2) may be used to combine block diagrams in FAUST
*expressions* (see below for examples). Every FAUST program
(filename extension `.dsp`) must define a function named
`process`, analogous to ```main`'' in C or C++
programs. The `process` function contains FAUST expressions
and/or other function expansions that specify the signal-processing
block diagram associated with that FAUST program.^{4}

A very simple FAUST program is

process(x) = x;which defines a simple ``wire'' block diagram that connects its single input to its single output. We can also define a pair of wires for stereo operation:

process(x,y) = x,y;Here we have introduced the comma block-diagram operator (,) on the righthand side which combines block diagrams in

Common block-diagram functions are *predefined*, such as ``
'':

process(x,y) = x,y:+;Now we have introduced the colon (:) operator for combining block diagrams in

Since the `+` operator already has two inputs, we do not need to refer to them
explicitly. Thus,

process = +;is equivalent to ``

The underbar symbol `_`, also called a ``wire'', denotes the
trivial block diagram that feeds its single input to its single
output. Thus, using the predefined block diagram ```_`'' we can
define the ``mono wire'' function ```process(x)=x;`'' as

process = _;and the ``stereo bus'' as

process = _,_;which is equivalent to ``

The block diagram generated by `faust -svg wire.dsp` (as used
by the script `faust2firefox`), where `wire.dsp` contains
`process=_;`, is shown in Fig.2.

Arguably even simpler is

process = 0;where

It is convenient to refer to a block diagram as a *signal* when
it has no input signals and one output signal.

Similarly,

process = 1;specifies a block diagram having no input signals and an output signal that is a stream of ones

impulse = 1 - 1';because 1 is the unit-step signal (a unit constant turning on at time 0) and

- Basic Signal Processing Blocks (Elementary Operators on Signals)
- Block Diagram Operators
- Examples
- Infix Notation Rewriting
- Encoding Block Diagrams in the FAUST Language
- Statements
- Function Definition
- Partial Function Application
- Functional Notation for Operators
- Examples
- Summary of FAUST Notation Styles
- Unary Minus
- Fixing the Number of Input and Output Signals
- Naming Input Signals
- Naming Output Signals
- Signal Types
- Signal Comparison Operators
- Bitwise Operations for Integer Signals
- Foreign Constants and Variables
- Foreign Functions

- Parallel and Sequence Iterations
- Sum and Product Macros
- Pattern Matching in FAUST
- Formal Parameter Exception
- Formal Parameter Substitution
^{9} - Recursive Block Diagram Specification
- Understanding
`count`and`take`from`basics.lib` - Pattern Matching Implementation
- Using Pattern Matching in Rewriting Rules
- Using Lisp Syntax to Express Trees
- Pattern-Matching Example
- Pattern-Matching Algorithm Description
- Miscellaneous Pattern-Matching Examples

- Scope Rules
- White Noise Generator
- Further Readings on the FAUST Language
- Acknowledgment

Download aspf.pdf

[Comment on this page via email]

Copyright ©

Center for Computer Research in Music and Acoustics (CCRMA), Stanford University