Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Overview  





2 Example code  





3 Block diagram composition  





4 Generating full applications  





5 Generating block diagrams  





6 Arrows-like semantics  





7 References  





8 External links  














FAUST (programming language)






Deutsch
Español
Français
Українська
 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikimedia Commons
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


FAUST
Original author(s)Yann Orlarey, Dominique Fober, Stéphane Letz
Developer(s)GRAME, Centre National de Création Musicale
Initial release2002 (2002)
Stable release

2.60.3[1] / June 14, 2023 (2023-06-14)

Written inC++
Operating systemLinux, OS X, Windows, Unix
TypeFunctional programming language for audio signal processing
LicenseGPL
Websitefaust.grame.fr

FAUST (Functional AUdio STream) is a domain-specific purely functional programming language for implementing signal processing algorithms in the form of libraries, audio plug-ins, or standalone applications. A FAUST program denotes a signal processor: a mathematical function that is applied to some input signal and then fed out.

Overview[edit]

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

A FAUST program doesn't describe a sound or a group of sounds, but a signal processor. 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 code into a C++ object, which may then interface with other C++ code to produce a full program.

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

The semantics of FAUST is driven to be simple and well-defined. It allows the FAUST compiler to be semantically driven. Instead of compiling a program literally, it compiles the mathematical function it denotes. This may promote component reuse. Moreover, having access to the exact semantics of a FAUST program can simplify preservation issues.

FAUST is a textual language but block diagram oriented. It combines two approaches: functional programming and algebraic block diagrams, which are constructed via function composition. For that, FAUST relies on a block diagram algebra of five composition operations.

Example code[edit]

FAUST programs define a process function that operates on incoming data. This is analogous to the main function in most programming languages. The following is an example that produces silence:

process = 0;

The second example copies the input signal to the output. It involves the _ primitive that denotes the identity function for signals:

process = _;

Another example sums a stereo signal into a mono signal using the + primitive:

process = +;
Block diagrams generated by Faust from some simple programs

Most FAUST primitives are analogous to their C counterpart on numbers, but lifted to signals. For example, the FAUST primitive sin operates on a signal X by applying the C function sin to each sample X[t]. All C numerical functions have their counterpart in FAUST. Some signal processing primitives are specific to FAUST. For example, the delay operator @ takes two input signals: X (the signal to be delayed) and D (the delay to be applied), and produces an output signal Y such that Y(t) = X(t − D(t)).

Block diagram composition[edit]

Contrary to Max-like visual programming languages where the user does manual connections, FAUST primitives are assembled in block diagrams by using a set of high-level block diagram composition operations.

Simple examples of block diagram composition
The block diagram composition operators used in FAUST
f~g Recursive composition (precedence 4)
f,g Parallel composition (precedence 3)
f:g Sequential composition (precedence 2)
f<:g Split composition (precedence 1)
f:>g Merge composition (precedence 1)

Using the sequential composition operator : the output of + can be routed to the input of abs to compute the absolute value of the signal:

process = + : abs;

Here is an example of parallel composition using the , operator that arranges its left and right expressions in parallel. This is analogous to a stereo cable.

process = _,_;

These operators can be arbitrarily combined. The following code multiplies an input signal with 0.5:

process = _,0.5 : *;

The above may be rewritten in curried form:

process = *(0.5);

The recursive composition operator ~ can be used to create block diagrams with cycles (that include an implicit one-sample delay). Here is an example of an integrator that takes an input signal X and computes an output signal Y such that Y(t) = X(t) + Y(t−1):

process = + ~ _;

Generating full applications[edit]

Using specific architecture files, a FAUST program can be used to produce code for a variety of platforms and plug-in formats. These architecture files act as wrappers and describe the interactions with the host audio and GUI system. As of 2021, more than 30 architectures are supported and new ones may be implemented by anyone.

Screenshot of mixer.dsp (available in the FAUST distribution) using the jack-qt architecture
Some architecture files available for FAUST
alsa-gtk.cpp ALSA application + GTK
alsa-qt.cpp ALSA application + QT4
android.cpp Android applications
au.cpp Audio Unit plug-in
ca-qt.cpp CoreAudio application + QT4
ios-coreaudio.cpp iPhone and iPad applications
jack-gtk.cpp JACK application + GTK
jack-qt.cpp JACK application + QT4
ladspa.cpp LADSPA plug-in
max-msp.cpp Max MSP plug-in
pd.cpp Puredata plug-in
q.cpp Q language plug-in
supercollider.cpp Supercollider plug-in
vst.cpp VST plug-in
vsti-mono.cpp Monophonic VST Instrument plug-in
vsti-poly.cpp Polyphonic VST Instrument plug-in

Generating block diagrams[edit]

A useful option makes it possible to generate the block diagram representation of the program as one or more SVG graphic files.

It is useful to note the difference between the block diagram and the generated C++ code. As stated, the key idea here is not to compile the block diagram literally, but the mathematical function it denotes. Modern C/C++ compilers also don't compile programs literally. But because of the complex semantics of C/C++ (due to side effects, pointer aliasing, etc.) they can't go very far in that direction. This is a distinct advantage of a purely functional language: it allows compilers to do very advanced optimisations.

Arrows-like semantics[edit]

The Faust semantics is almost the same as that of Haskell's Arrows type class. However, the Arrow type class is not bound to signal processors.

Equivalences between FAUST and Arrow combinators
f~g loop ((\(a,b) -> (b,a)) ^>> f >>> id &&& (delay>>>g)) where delay is not a method of the Arrow type class, but is specific to signal processing arrows
f,g f***g
f:g f>>>g
f<:g f>>^h>>>g with appropriate function h (or&&& in special cases)
f:>g f>>^h>>>g with appropriate function h

The Arrow combinators are more restrictive than their FAUST counterparts, e.g., the nesting of parallel composition is preserved, and inputs of the operands of &&& must match exactly.

References[edit]

  • Michon, Romain; Smith, Julius O. III (2011). "Faust-STK: a Set of Linear and Nonlinear Physical Models for the Faust Programming Language" (PDF). Proceedings of the 11th Int. Conference on Digital Audio Effects (DAFx-11): 199–204.
  • Fober, Dominique; Orlarey, Yann; Letz, Stéphane (2011). "Faust Architectures Design and OSC Support" (PDF). Proceedings of the 11th Int. Conference on Digital Audio Effects (DAFx-11): 213–216.
  • Smith, Julius O. III; Michon, Romain (2011). "Nonlinear Allpass Ladder Filters in Faust" (PDF). Proceedings of the 11th Int. Conference on Digital Audio Effects (DAFx-11): 361–364.
  • Jouvelot, Pierre; Orlarey, Yann (2011). "Dependent Vector Types for Data Structuring in Multirate Faust" (PDF). Computer Languages, Systems & Structures. 37 (3): 113–131. doi:10.1016/j.cl.2011.03.001.[permanent dead link]
  • Smith III, Julius O. (2011). "Audio Signal Processing in Faust" (PDF).
  • Orlarey, Yann; Letz, Stéphane; Fober, Dominique (2010). "Automatic Parallelization of Audio Applications with Faust" (PDF). Proceedings of the Congrès Français d'Acoustique.[permanent dead link]
  • Letz, Stéphane; Orlarey, Yann; Fober, Dominique (2010). "Work Stealing Scheduler for Automatic Parallelization in Faust" (PDF). Proceedings of the Linux Audio Conference (LAC-2010).
  • Gräf, Albert (2010). "Term rewriting extension for the Faust programming language" (PDF). Proceedings of the 8th International Linux Audio Conference (LAC-2010): 117.
  • Barthélemy, Jérôme; Bonardi, Alain; Orlarey, Yann; Lemouton, Serge; Ciavarella, Raffaele; Barkati, Karim (2010). "First Steps Towards an Organology of Virtual Instruments in Computer Music" (PDF). Proceedings of the 2010 International Computer Music Conference (ICMA-2010): 369–372.[permanent dead link]
  • Jouvelot, Pierre; Orlarey, Yann (2010). "Depandant Vector Types for Multirate Faust" (PDF). Proceedings of the 7th Sound and Music Computing Conference (SMC-2010): 345–352. Archived from the original (PDF) on 2012-04-07. Retrieved 2011-10-11.
  • Orlarey, Yann; Letz, Stéphane; Fober, Dominique (2009). "Adding Automatic Parallelization to Faust" (PDF). Proceedings of the Linux Audio Conference (LAC-2009).[permanent dead link]
  • Jouvelot, Pierre; Orlarey, Yann (2009). "Semantics for Multirate Faust". Technical Repports of Centre de Recherche en Informatique de MINES ParisTech (PDF).[permanent dead link]
  • Orlarey, Yann; Fober, Dominique; Letz, Stéphane (2009). "Parallelization of Audio Applications with Faust" (PDF). {{cite journal}}: Cite journal requires |journal= (help)
  • Orlarey, Yann; Fober, Dominique; Letz, Stéphane (2009). "Faust: an Efficient Functional Approach to DSP Programming". New Computanionals Paradigms for Computer Music (PDF). Edition Delatour. ISBN 978-2-7521-0054-2.[permanent dead link]
  • Orlarey, Yann; Letz, Stéphane; Fober, Dominique (2008). "Multicore Technologies in Jack and Faust" (PDF). Proceedings of the 2010 International Computer Music Conference (ICMC-2008).[permanent dead link]
  • Gräf, Albert (2007). "Interfacing Pure Data with Faust" (PDF). Proceedings of the 5th International Linux Audio Conference (LAC2007): 24.
  • Smith III, Julius O. (2007). "Appendix K. Digital Filtering in Faust and PD". Introduction to Digital Filters: With Audio Applications. W3K Publishing. pp. 417–?. ISBN 978-0-9745607-1-7.
  • Gräf, Albert; Kersten, Stefan; Orlarey, Yann (2006). "DSP Programming with Faust, Q and SuperCollider" (PDF). Proceedings of the 4th International Linux Audio Conference (LAC2006).
  • Trausmuth, Robert; Dusek, Christian; Orlarey, Yann (2006). "Using Faust for FPGA Programming" (PDF). Proceedings of the 9th Int. Conference on Digital Audio Effects (DAFx-09).
  • Orlarey, Yann; Fober, Dominique; Letz, Stephone (2005). "Demonstration of Faust Signal Processing Language". Proceedings of the International Computer Music Conference. Vol. 2005. Computer Music Association. p. 286.
  • Orlarey, Yann; Fober, Dominique; Letz, Stéphane (2004). "Syntactical and Semantical Aspects of Faust". Soft Computing (PDF).[permanent dead link]
  • Scaringella, Nicolas; Orlarey, Yann; Fober, Dominique (2003). "Automatic Vectorization in Faust" (PDF). Journée de l'Informatique Musicale (JIM-2003).[permanent dead link]
  • Orlarey, Yann; Fober, Dominique; Letz, Stéphane (2002). "An Algebraic Approach to Block Diagram Constructions" (PDF). Journée de l'Informatique Musicale (JIM-2002).[permanent dead link]
  • Orlarey, Yann; Fober, Dominique; Letz, Stéphane (2002). "An Algebra for Block Diagram Languages" (PDF). Proceedings of International Computer Music Conference (ICMA-2002).[permanent dead link]
  • External links[edit]


    Retrieved from "https://en.wikipedia.org/w/index.php?title=FAUST_(programming_language)&oldid=1177889551"

    Category: 
    Audio programming languages
    Hidden categories: 
    Articles with short description
    Short description is different from Wikidata
    Articles lacking in-text citations from March 2015
    All articles lacking in-text citations
    Articles containing potentially dated statements from 2021
    All articles containing potentially dated statements
    All articles with dead external links
    Articles with dead external links from December 2016
    Articles with permanently dead external links
    Articles with dead external links from December 2019
    CS1 errors: missing periodical
    Commons category link is on Wikidata
    Official website different in Wikidata and Wikipedia
     



    This page was last edited on 30 September 2023, at 07:43 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki