faustax
Copyright (c) 2026 David Braun

This product includes software developed by third parties. The terms below
supplement, and in the places noted supersede, the MIT license in LICENSE.


================================================================================
1. What the MIT license in LICENSE covers
================================================================================

LICENSE (MIT) covers the code written for this repository:

    src/faustax/*.py        (excluding src/faustax/_generated/)
    dsp/*.dsp
    tests/, examples/, tools/, docs/

It does NOT, on its own, describe the terms of:

    src/faustax/_generated/*.py                     -> section 2
    src/faustax/ops.py, src/faustax/dynamics.py,    -> section 3 (MIT, but
    src/faustax/diffvox.py,                            carrying an additional
    src/faustax/dsp/diffvox/*.dsp                      upstream copyright)
    src/faustax/reverb.py and the dasp-parity       -> section 3.1
    dsp sources named there                            (Apache-2.0-derived)

Those files are distributed under terms that are compatible with, but not
identical to, this repository's own MIT grant. Sections 2 and 3 give the
details.


================================================================================
2. Generated modules (Faust)
================================================================================

The modules in `src/faustax/_generated/` are produced by the Faust compiler
(https://faust.grame.fr) from the `.dsp` sources in `src/faustax/dsp/`. Each
generated module is the union of two
third-party contributions plus this repository's own DSP.

2.1 The Faust NNX architecture file
-----------------------------------

The scaffolding of every generated module -- the module class, the parameter
plumbing, the NNX state handling -- comes from Faust's `architecture/jax`
architecture file:

    FAUST Architecture File
    Copyright (C) 2026 GRAME, Centre National de Creation Musicale

    This is sample code. This file is provided as an example of minimal
    FAUST architecture file. Redistribution and use in source and binary
    forms, with or without modification, in part or in full are permitted.
    In particular you can create a derived work of this FAUST architecture
    and distribute that work under terms of your choice.

    This sample code is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

That grant is reproduced at the top of every generated module, and it is what
permits this repository to distribute the generated modules under its own
terms.

The architecture file's parameter-clamping code implements the straight-through
clamp described in:

    Hayes, B. (2025). Magic Clamp. https://github.com/ben-hayes/magic-clamp

The implementation shipped here is GRAME's, not a copy of that repository; the
citation is carried through from the architecture file as attribution for the
technique.

2.2 The Faust standard libraries
--------------------------------

The DSP body of each generated module is a translation of Faust standard
library code (https://github.com/grame-cncm/faustlibraries) into JAX. Those
libraries carry a per-file GNU LGPL 2.1 header from GRAME with the following
explicit exception, which is what allows the translated output to be
distributed under this repository's MIT license:

    EXCEPTION TO THE LGPL LICENSE : As a special exception, you may create a
    larger FAUST program which directly or indirectly imports this library
    file and still distribute the compiled code generated by the FAUST
    compiler, or a modified version of this compiled code, under your own
    copyright and license. This EXCEPTION TO THE LGPL LICENSE explicitly
    grants you the right to freely choose the license for the resulting
    compiled code.

Individual functions within those libraries additionally declare their own
license, most often MIT or the MIT-style STK-4.3 license. Those licenses
require that their copyright and permission notices travel with the code, which
is the purpose of this section.

The table below is generated from the `json_metadata` blob that the Faust
compiler embeds in every module -- the authoritative record of which library
functions each module drew on. Regenerate it with:

    python tools/collect_attribution.py

| Faust library | Declared licenses and copyrights | Used by |
| --- | --- | --- |
| `basics.lib` | see faustlibraries | compressor, diffvox_compressor, diffvox_fdn, distortion, gain, learnable_control_response, learnable_two_knob, mode_drive |
| `delays.lib` | see faustlibraries | diffvox_compressor, diffvox_pingpong, freeverb |
| `filters.lib` | Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>; MIT-style STK-4.3 license | diffvox_eq, diffvox_fdn, diffvox_pingpong, freeverb, learnable_two_knob, lowpass_automated, modal_piano, parametric_eq |
| `interpolators.lib` | see faustlibraries | learnable_control_response, learnable_two_knob |
| `maths.lib` | GRAME; LGPL with exception | compressor, diffvox_compressor, diffvox_eq, diffvox_fdn, diffvox_pingpong, distortion, freeverb, learnable_control_response, learnable_two_knob, lowpass_automated, modal_piano, mode_drive, parametric_eq, stereo_panner |
| `physmodels.lib` | see faustlibraries | modal_piano |
| `platform.lib` | see faustlibraries | compressor, diffvox_compressor, diffvox_eq, diffvox_fdn, diffvox_pingpong, freeverb, learnable_two_knob, lowpass_automated, modal_piano, parametric_eq |
| `rbj.lib` | MIT | diffvox_eq, diffvox_fdn, diffvox_pingpong, parametric_eq |
| `reverbs.lib` | see faustlibraries | freeverb |
| `stdfaust.lib` | see faustlibraries | compressor, diffvox_compressor, diffvox_eq, diffvox_fdn, diffvox_pingpong, distortion, freeverb, gain, learnable_control_response, learnable_two_knob, lowpass_automated, modal_piano, mode_drive, parametric_eq, stereo_panner, stereo_widener |

Named copyright holders of the library functions reached by these modules:

    Copyright (C) 2003-2019 Julius O. Smith III <jos@ccrma.stanford.edu>
        filters.lib -- lowpass, tf1, tf1s, tf2, fir, iir, allpass_comb
    Copyright GRAME, Centre National de Creation Musicale
        maths.lib, platform.lib, and the libraries as a whole
    Romain Michon
        reverbs.lib -- mono_freeverb

The MIT-style STK-4.3 license, under which the Julius O. Smith III functions
above are released, reads:

    Permission is hereby granted, free of charge, to any person obtaining a
    copy of this software and associated documentation files (the "Software"),
    to deal in the Software without restriction, including without limitation
    the rights to use, copy, modify, merge, publish, distribute, sublicense,
    and/or sell copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    Any person wishing to distribute modifications to the Software is asked to
    send the modifications to the original developer so that they can be
    incorporated into the canonical version.  For software copyrighted by
    Julius O. Smith III, email your modifications to <jos@ccrma.stanford.edu>.
    This is, however, not a binding provision of this license.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    DEALINGS IN THE SOFTWARE.


================================================================================
3. Ported algorithms (torchlpc, philtorch, torchcomp, diffvox, dasp-pytorch)
================================================================================

`src/faustax/ops.py`, `src/faustax/dynamics.py`, `src/faustax/diffvox.py` and
the `src/faustax/dsp/diffvox/*.dsp` sources are original JAX/Faust code, but
they implement gradient rules, filter conventions and effect definitions taken
from Chin-Yun Yu's PyTorch libraries, and follow their conventions closely
enough to be treated as ports. Those libraries are MIT licensed:

    torchlpc   -- https://github.com/DiffAPF/torchlpc
                  Copyright (c) 2023 Chin-Yun Yu
                  The all-pole custom-VJP rule in `ops.allpole` (Yu & Fazekas,
                  "Differentiable All-pole Filters for Time-varying Audio
                  Systems", DAFx 2024, arXiv:2404.07970).

    philtorch  -- https://github.com/yoyolicoris/philtorch
                  Copyright (c) 2025 Chin-Yun Yu
                  The DF2 decomposition behind `ops.fir`/`ops.lfilter` and the
                  state-space conventions and adjoint VJP behind
                  `ops.state_space` and `ops.diag_state_space`.

    torchcomp  -- https://github.com/DiffAPF/torchcomp
                  Copyright (c) 2024 Chin-Yun Yu
                  The compressor/limiter ballistics and gain-computer
                  conventions in `faustax.dynamics`.

    diffvox    -- https://github.com/SonyResearch/diffvox
                  Copyright (c) 2025 Chin-Yun Yu
                  The vocal effects chain of Yu et al., "DiffVox: A
                  Differentiable Model for Capturing and Analysing Vocal
                  Effects Distributions" (DAFx 2025): the processor
                  definitions behind the `dsp/diffvox/` sources
                  (eq, compressor, pingpong, fdn), and the preset
                  parametrizations
                  behind `faustax.diffvox`.
                  No preset data is redistributed here; `faustax.diffvox`
                  reads the curated datasets from a diffvox checkout you
                  supply.

All four are distributed under the MIT license:

    Permission is hereby granted, free of charge, to any person obtaining a
    copy of this software and associated documentation files (the "Software"),
    to deal in the Software without restriction, including without limitation
    the rights to use, copy, modify, merge, publish, distribute, sublicense,
    and/or sell copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    DEALINGS IN THE SOFTWARE.

3.1 dasp-pytorch (Apache-2.0)
-----------------------------

The dasp-pytorch parity layer ports Christian Steinmetz's dasp-pytorch
(https://github.com/csteinmetz1/dasp-pytorch) the same way the section above
ports Chin-Yun Yu's libraries — original JAX/Faust code following the
upstream definitions closely enough to be treated as ports:

    src/faustax/reverb.py                    the 12-band noise-shaped
                                             reverberation (Steinmetz, Ithapu
                                             & Calamia, WASPAA 2021), a close
                                             function-level port
    src/faustax/dsp/distortion.dsp           tanh waveshaper convention
    src/faustax/dsp/parametric_eq.dsp        six-section layout, parameter
                                             names and slider ranges
    src/faustax/dsp/compressor.dsp           level detector, soft-knee static
                                             curve and attack constant
    src/faustax/dsp/stereo_widener.dsp       mid-side width math
    src/faustax/dsp/stereo_panner.dsp        equal-power pan law
    faustax.functional.stereo_bus            gain-and-sum bus

Unlike the four libraries above, dasp-pytorch is licensed under the Apache
License, Version 2.0, not MIT. A copy ships in this repository as
`LICENSE-APACHE-2.0` and is the license of record for the derived portions
named here:

    dasp-pytorch -- https://github.com/csteinmetz1/dasp-pytorch
                    Copyright Christian J. Steinmetz
                    Licensed under the Apache License, Version 2.0


================================================================================
4. Optional dependencies with non-permissive terms
================================================================================

`fdn_toolbox` (https://github.com/DBraun/FeedbackDelayNetworks-JAX) is licensed
under the **GPL-3.0**. faustax does not vendor, link, or require it. It is used
only by `examples/studies/fdn_cross_validation.py` and
`tests/test_fdn_cross_validation.py`, which cross-check the compiled Faust FDN
against an independent renderer; both skip cleanly when it is absent, and it is
declared in the optional `dev-fdn` dependency group rather than in `dev`.

Installing it and running those two files produces a combined work covered by
the GPL-3.0. Nothing you get from `pip install faustax` is affected.
