FAUST (programming Language) - Overview

Overview

The FAUST programming model combines a functional programming approach with a block-diagram syntax:

  • The functional programming approach provides a natural framework for signal processing. Digital signals are modeled as discrete functions of time, signal processors as second order functions that operate on them, and FAUST’s block-diagram composition operators, used to combine signal processors together, as third order functions, etc. .
  • Block-diagrams, even if purely textual like in FAUST, promote a modular approach of signal processing that suits very well the sound engineers’ and audio developers’ habits, while providing a powerful and expressive syntax.

A FAUST program doesn’t describe a sound or a group of sounds, but a signal processor, something that transforms input signals and produces output signals. The program source is organized as a set of definitions with at least the definition of the keyword process (the equivalent of main in C):

process = ...;

The FAUST compiler translates FAUST programs into equivalent C++ programs taking care of generating the most efficient code. The result can generally compete with, and sometimes even outperform, C++ code written by seasoned programmers.

The generated code works at the sample level. It is therefore suited to implement low-level DSP functions like recursive filters. Moreover the code can be easily embedded. It is self-contained and does not depend on any DSP library or runtime system. It has a very deterministic behaviour and a constant memory footprint.

The semantic of FAUST is simple and well defined. This is not just of academic interest. It allows the FAUST compiler to be semantically driven. Instead of compiling a program literally, it compiles the mathematical function it denotes. This feature is useful for example to promote components reuse while preserving optimal performance. Moreover having access to the exact semantics of a FAUST program can simplify preservation issues.

FAUST is a textual language but nevertheless block-diagram oriented. It actually combines two approaches: functional programming and algebraic block-diagrams. The key idea is to view block-diagram construction as function composition. For that, FAUST relies on a block-diagram algebra of five composition operations.

Read more about this topic:  FAUST (programming Language)