Faust DSP Libraries

repository·master·Indexed 42 days ago

https://github.com/grame-cncm/faustlibraries

Source code and documentation for the Digital Signal Processing (DSP) libraries of the Faust Programming Language. Includes specialized libraries for signal analysis (analyzers.lib), adaptive filtering (filters.lib), spatial audio (spats.lib), and miscellaneous effects (misceffects.lib), as well as a collection of community-developed libraries such as abclib and realfaust.

Tokens
149.5K
Snippets
741
Records
872
Agent score
53%

What's inside Faust Libraries

  1. Overview of basics.lib

    master
    The basics.lib library (official prefix ba) provides low-level building blocks for core DSP and Faust programming. It includes utilities for math, routing, signal conditioning, timing, control, and helper components used across higher-level libraries. The library is organized into several sections including Conversion Tools, Counters, Array Processing, Function Tabulation, Selectors, Sliding Reduce, and Parallel Operators.
  2. Overview of the maths.lib library

    master

    The maths.lib library provides mathematical functions and utilities for numerical computations in Faust. It is used for trigonometric, exponential, logarithmic, and statistical operations, as well as complex-number operations and various constants.

    All functions and constants in this library use the official prefix ma.

  3. Overview of the analyzers.lib library

    master

    The analyzers.lib library (official prefix an) provides reusable building blocks for audio signal analysis and metering. It is designed for measuring levels, extracting features, and computing statistics for visualization, diagnostics, adaptive processing, and music information retrieval.

    The library is organized into 11 functional sections:

    • Amplitude Tracking
    • Adaptive Frequency Analysis
    • Spectrum-Analyzers
    • Mth-Octave Spectral Level
    • Arbitrary-Crossover Filter-Banks and Spectrum Analyzers
    • Fast Fourier Transform (fft) and its Inverse (ifft)
    • Window Functions
    • FFT Subsystem
    • Spectral Descriptors (filter-bank based)
    • Loudness Metering (EBU R128 / ITU-R BS.1770)
    • Test signal generators
  4. Overview of Faust Libraries Audit

    master

    This audit evaluates the quality, documentation, and DSP coverage of the Faust libraries. The analysis covers 43 .lib files (approximately 52,976 lines of code and ~1,350 high-level definitions) using the FAUST 2.87.4 compiler.

    Key strengths identified:

    • High Parsing Reliability: All 43 libraries parse without warnings in FAUST 2.87.4.
    • Structured Documentation: Uses a consistent convention (#### Usage, #### Test, etc.) transformed into an MkDocs site via doc/scripts/faustlib2md.awk.
    • Executable Examples: Most documentation blocks include executable tests (xxx_test = ...) that are verified by tests/*.dsp files.
    • Specialized Domains: High-quality implementations of physical modeling, virtual analog filters, anti-aliased non-linearities, and reverberation algorithms.
  5. Overview of the wdmodels.lib library

    master
    The wdmodels.lib library (prefix wd) provides a framework for constructing Wave Digital Filter (WDF) models of audio circuitry directly within the Faust programming language. It is designed for creating real-time virtual-analog audio effects and synthesizers without requiring C++. The library is written in Faust to ensure portability and is heavily based on Kurt Werner's dissertation on Wave Digital Filter modeling.
  6. Overview of demos.lib

    master

    The demos.lib library (official prefix dm) provides a collection of example DSP algorithms and demonstrations. It is designed to illustrate Faust features, syntax, and best practices through simple implementations of oscillators, filters, effects, and synthesis examples. It is useful for learning and testing Faust code.

    The library is organized into seven sections:

    • Analyzers
    • Filters
    • Effects
    • Reverbs
    • Generators
    • Motion
    • Hysteresis
  7. Overview of the Hysteresis library

    master

    The hysteresis.lib library (prefix hy) provides physics-based magnetic hysteresis models for audio processing. It is designed for simulating transformer saturation, tape emulation, and various magnetic effects using the Jiles-Atherton model.

    Musical Character

    You can achieve different textures by blending between these two calibration extremes:

    Calibrationc (reversibility)Character
    -50 dB0.25Forward, open, dynamic
    0 dB0.9Compressed, set back, controlled
  8. Overview of community DSP libraries

    master

    The Faust community has developed several specialized libraries for different DSP tasks:

    • abclib: Focuses on spatial sound processing, ambisonics, multi-channel sound processing, and utility objects for mixed music.
    • Edge of Chaos: Provides building blocks for musical complex adaptive systems, including time-domain algorithms, network topologies, and energy-preserving techniques for self-oscillating systems.
    • realfaust: Provides domain-limited versions of Faust primitives and math functions to prevent INF or NaN values, ensuring stability in real-time performance.
    • bitDSP-faust: Explores bit-based algorithms, including delta-sigma modulations, cellular automata, recursive Boolean networks, and linear feedback shift registers.
    • SEAM library: Developed for Sustained Electro-Acoustic Music projects.
    • Ambitools: Scalable implementation of Ambisonic tools for various orders and architectures.
    • Faust Tap Library: Allows tapping complicated expressions to extract specific outputs without manual routing.
    • MoreFilters: Implements highpass/lowpass filters (Biquad, Butterworth, Bessel, and Linkwitz Riley) using fi.svf.
    • lsfaustlibraries: A collection of libraries by Luca Spanedda.
  9. Overview of the signals.lib library

    master

    The signals.lib library provides fundamental signal processing operations for Faust. It includes generators, combinators, selectors, and basic DSP utilities. These functions are essential building blocks used across all Faust libraries for constructing and manipulating audio and control signals.

    All functions in this library use the official prefix si..

  10. Overview of vaeffects.lib

    master
    The vaeffects.lib library (prefix ve) provides Virtual Analog (VA) audio effects modeled after classic analog circuitry. It includes nonlinear filters and effects organized into several categories: Moog Filters, Korg 35 Filters, Oberheim Filters, Sallen Key Filters, Vicanek's Matched Second-Order Filters, and general Effects.
  11. Overview of the Antialiased Nonlinearities (aanl.lib) library

    master

    The aanl.lib library provides antialiased nonlinearities using first-order and second-order Antiderivative Anti-Aliasing (ADAA) approximations. This technique suppresses aliasing in nonlinear audio processing by approximating continuous-time signals and functions based on their antiderivatives.

    Key Characteristics

    • Prefix: All functions are accessed via the aa. prefix (e.g., aa.hardclip).
    • Delay: Antialiasing functions introduce signal delay: first-order functions introduce a half-sample delay, while second-order functions introduce a one-sample delay.
    • Precision: Due to division by differences in the implementation, it is highly recommended to use double-precision to minimize errors.
    • Best Use Case: These functions perform best with high-amplitude input signals. For very low-amplitude signals where saturation is negligible, standard (trivial) saturators might be preferable to avoid noise introduced by the ADAA process. A common pattern is to cross-fade between trivial and antialiased saturators based on input amplitude.
    • Oversampling: The library is particularly effective when combined with low-factor oversampling (e.g., 96 kHz or 192 kHz).
  12. Overview of physmodels.lib

    master

    The physmodels.lib library (official prefix pm) is a Faust physical modeling library designed for musical instrument modeling and acoustic simulation research. It provides tools for waveguide, mass-spring, and digital wave models for strings, membranes, bars, and resonant systems.

    The library is organized into several functional areas:

    • Global Variables: Pre-defined physical constants.
    • Conversion Tools: Functions to convert between physical units (e.g., frequency to length).
    • Bidirectional Utilities: Core functions for building bidirectional block diagrams.
    • Basic Elements: Waveguides and filters.
    • Instrument Models: Specialized models for strings, bowed strings, wind instruments, and modal percussion.
    • Exciters & Vocal Synthesis: Pluck generators, blowers, and vocal synthesis techniques.