Skip to main content

cyfaust

The cyfaust project provides a minimal, modular, self-contained, cross-platform cython wrapper of the Faust DSP language and the RtAudio cross-platform audio driver.

  • Dual Backends: Interpreter (default, ~8MB) or LLVM JIT (~33MB, faster execution)

  • Box API: Fully wrapped with both functional and object-oriented interfaces

  • Signal API: Fully wrapped with both functional and object-oriented interfaces

  • Platform Support: macOS, Linux, and Windows

  • Build Variants: Dynamic (libfaust.so|dylib) and static (libfaust.a|lib)

  • Faust Version: 2.85.9

  • Documentation: cyfaust-docs

Installation

To install cyfaust with the faust interpreter backend (default):

pip install cyfaust

To install with the LLVM JIT backend:

pip install cyfaust-llvm

Features

  • Python-oriented cross-platform implementation of the Faust DSP language

  • Two backend options:

    • Interpreter (default): Compact ~8MB binary, good for development and most use cases

    • LLVM JIT: ~33MB binary with native code compilation for maximum performance

  • Provides the following submodules (in the default build):

    • cyfaust.interp: wraps the faust interpreter and the rtaudio audio driver

    • cyfaust.box: wraps the faust box api

    • cyfaust.signal: wraps the faust signal api

    • cyfaust.common: common utilities and classes

  • Self-contained, minimal, and modular design

  • Can generate code using the following backends: c++, c, rust, codebox

  • Can generate auxiliary files such as SVG block diagrams of DSP

  • Dual functional/OO design for box and signal APIs with minimal code duplication

  • Implements Memoryviews for read/write buffer using numpy or array.array

  • Runtime UI parameter control: enumerate a DSP's controls and get/set their values by full path or label (params(), get_param(), set_param())

  • Both dynamic and static build variants can be packaged as a self-contained python wheel

  • Command-line interface for common operations

Quick Start

from cyfaust.interp import create_dsp_factory_from_string, RtAudioDriver
import time

# Define Faust DSP code
code = """
import("stdfaust.lib");
process = os.osc(440);
"""

# Create factory and DSP instance
factory = create_dsp_factory_from_string("osc", code)
dsp = factory.create_dsp_instance()
dsp.init(48000)

# Play through speakers
driver = RtAudioDriver(48000, 256)
driver.init(dsp)
driver.start()
time.sleep(2)
driver.stop()

Runtime parameters

A DSP's UI controls (sliders, buttons, checkboxes, nentries, bargraphs) can be enumerated and driven at runtime:

from cyfaust.interp import create_dsp_factory_from_string

factory = create_dsp_factory_from_string(
    "gain", 'process = _ * hslider("gain", 1, 0, 2, 0.01);'
)
dsp = factory.create_dsp_instance()
dsp.init(48000)

for p in dsp.params():
    print(p.path, p.kind, p.init, p.min, p.max)  # /gain/gain hslider 1.0 0.0 2.0

dsp.set_param("gain", 0.5)   # address by leaf label or full path; takes effect on the next compute
dsp.get_param("gain")        # 0.5

Buttons, checkboxes, sliders, and nentries are settable inputs; bargraphs are read-only outputs (set_param on one raises ValueError, as do unknown or ambiguous keys).

See the Getting Started guide and Examples for more usage patterns including the Box API, Signal API, buffer computation, and serialization.

Command-Line Interface

cyfaust provides a CLI accessible via the cyfaust command or python -m cyfaust:

cyfaust <command> [options]
Command Description
version Show cyfaust and libfaust version information
info Display DSP metadata, inputs, outputs, and dependencies
compile Compile Faust DSP to target backend (cpp, c, rust, codebox)
expand Expand Faust DSP to self-contained code with all imports resolved
diagram Generate SVG block diagrams
play Play a DSP file with RtAudio
params List DSP parameters, or get/set control values by path/label
validate Check a DSP file for errors
bitcode Save/load compiled DSP as bitcode for faster loading
json Export DSP metadata as JSON

Examples:

cyfaust play osc.dsp -d 5                     # play for 5 seconds
cyfaust compile synth.dsp -b cpp -o synth.cpp  # compile to C++
cyfaust params synth.dsp                       # list parameters (path, kind, range, value)
cyfaust params synth.dsp --get gain            # read a control value
cyfaust params synth.dsp --set gain 0.5        # set a control value
cyfaust json instrument.dsp --pretty           # export metadata
cyfaust validate filter.dsp --strict           # check for errors

See the full CLI Reference for all options.

Building from Source

git clone https://github.com/shakfu/cyfaust.git
cd cyfaust
make        # builds libfaust + installs for development
make test   # run tests

Common build targets:

make                   # dynamic interpreter build (default)
make STATIC=1 build    # static interpreter build
make build-llvm        # static LLVM build
make wheel             # build wheel
make wheel-llvm        # build LLVM wheel (cyfaust-llvm)
make wheel-windows     # Windows one-shot (deps + wheel + delvewheel)

Build options (set via make VAR=1):

Option Default Description
STATIC 0 Build with static libfaust
LLVM 0 Build with LLVM backend (requires STATIC=1)
INCLUDE_SNDFILE 1 Include sndfile support
ALSA 1 ALSA audio (Linux)
PULSE 0 PulseAudio (Linux)
JACK 0 JACK (Linux/macOS)
WASAPI 1 WASAPI (Windows)
ASIO 0 ASIO (Windows)
DSOUND 0 DirectSound (Windows)

Windows

On Windows, use the provided build script:

python scripts/build_windows.py              # static wheel (default)
python scripts/build_windows.py --dynamic    # dynamic wheel (bundles faust.dll)
python scripts/build_windows.py --clean      # clean first, then build
python scripts/build_windows.py --test       # build + install + run tests

If you have GNU Make installed, make wheel-windows also works for dynamic wheels.

Prerequisites: Visual Studio 2022 (or MSVC Build Tools), Python 3.10+, uv, and CMake.

See the full Building from Source guide for platform prerequisites, LLVM backend details, and wheel building instructions.

Platform Support

Interpreter backend (cyfaust):

Platform Architecture Status
macOS arm64 (Apple Silicon) Supported
macOS x86_64 (Intel) Supported
Linux x86_64 Supported
Linux aarch64 Supported
Windows x86_64 Supported

LLVM backend (cyfaust-llvm):

Platform Architecture Status
macOS arm64 (Apple Silicon) Supported
macOS x86_64 (Intel) Supported
Linux x86_64 Supported
Linux aarch64 Supported
Windows x86_64 Planned

Prior Art of Faust + Python

  • DawDreamer by David Braun: Digital Audio Workstation with Python; VST instruments/effects, parameter automation, FAUST, JAX, Warp Markers, and JUCE processors. Full-featured and well-maintained. Use this for actual work! (pybind11)

  • faust_python by Marc Joliet: A Python FAUST wrapper implemented using the CFFI (updated 2015). There's a more recent (updated in 2019) fork by Patrik Lechner. (cffi)

  • pyfaust by Alexandru Stan: Embed Faust DSP Programs in Python. (cffi)

  • faust-ctypes: a port of Marc Joliet's FaustPy from CFFI to Ctypes. (ctypes)

  • faustpp: A post-processor for faust, which enables more flexible code generation.

Metadata

Release files for cyfaust 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for cyfaust 0.2.1
File
cyfaust-0.2.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
cyfaust-0.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
cyfaust-0.2.1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
cyfaust-0.2.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
cyfaust-0.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
cyfaust-0.2.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
cyfaust-0.2.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
cyfaust-0.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
cyfaust-0.2.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
cyfaust-0.2.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
cyfaust-0.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
cyfaust-0.2.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
cyfaust-0.2.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
cyfaust-0.2.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
cyfaust-0.2.1-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 121.9 MB

Release files / cyfaust-0.2.1-cp314-cp314-win_amd64.whl

Download URL cyfaust-0.2.1-cp314-cp314-win_amd64.whl
Size 7.3 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
bf705fb970b091abca7b97a84d8aca46916637e10b7e443188cb8eecc70474f1
BLAKE2b-256 checksum
How to use checksums
6caa76e4ea49ad9aada7b21c6e9b34ededd16f205f249504c43f08a21aef2f93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL cyfaust-0.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 9.3 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d55477070d819873e15a4b153437bd8f1085417fc44beea292879afa63752f01
BLAKE2b-256 checksum
How to use checksums
bd31fc82293b77cb14db387598681318b745340b838c30ed0c6f77f181ab5768
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp314-cp314-macosx_11_0_arm64.whl

Download URL cyfaust-0.2.1-cp314-cp314-macosx_11_0_arm64.whl
Size 7.8 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
abf7f4956e6db24fe289f51f2480aa803f49aa657274ed0dd7ef5f6e7ddf26c0
BLAKE2b-256 checksum
How to use checksums
61480f7f22332228d3d066324322539f88ba7351dca4eb90fdc03764ff8b990d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp313-cp313-win_amd64.whl

Download URL cyfaust-0.2.1-cp313-cp313-win_amd64.whl
Size 7.2 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
f9f16da78f52e3c2972d91a48385b0898e3d4e0de3e8344cfad9c1cc9a973bb6
BLAKE2b-256 checksum
How to use checksums
9f581ea3b20a33222727686947eedf7c70a4b56fbf4daf9f021f6fc2f8601555
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL cyfaust-0.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 9.3 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3a19fa6e829c30fdb4b3416b48bc9f87b7cbf5224eb2c03eb598db6f3562cdab
BLAKE2b-256 checksum
How to use checksums
78fed52b44fb9bd253fc394bc103cd9edf2f80731b77cd84e622214bb50f57e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL cyfaust-0.2.1-cp313-cp313-macosx_11_0_arm64.whl
Size 7.8 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
76d62d536ce6e23cb9ee2dd297817f05d05b945771c04408d9bc960529ffd37f
BLAKE2b-256 checksum
How to use checksums
0a8485f9e4c1e40e610a308c7b31b9062c5088eff96e9a65a694d33224bd6e47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp312-cp312-win_amd64.whl

Download URL cyfaust-0.2.1-cp312-cp312-win_amd64.whl
Size 7.2 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
edac5dcf9f57db0a3776020296bdcccb571a7af812c1379d108b75542f27acde
BLAKE2b-256 checksum
How to use checksums
e08959c14e4d189060d2164dddb09aafbed6b16dc9a7aed73c5ebfeb60c82f85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL cyfaust-0.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 9.3 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6d88bbb5a2118e87626c5bac5c223c43034ac98b9222fd79363ce9364eb80987
BLAKE2b-256 checksum
How to use checksums
e70b82f298653d2590b7562ae09d66cf7a87dfe68480dd779b3c089c8f47eb26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL cyfaust-0.2.1-cp312-cp312-macosx_11_0_arm64.whl
Size 7.8 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e22aae582ec0ebac8f854e76cec48144a34661a225532e96959b697743a84359
BLAKE2b-256 checksum
How to use checksums
6db9958a292f5e84427df45c721c7e067121171baf08d1530b7332b680968bd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp311-cp311-win_amd64.whl

Download URL cyfaust-0.2.1-cp311-cp311-win_amd64.whl
Size 7.2 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
369cc69fbace1e53148724fd7d2a76ff504c2f376d324480bb166cabb26fbbca
BLAKE2b-256 checksum
How to use checksums
8fc998b8e52173ff7868c5385a79903675d5691dac9dfac9d150792fd682e893
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL cyfaust-0.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 9.3 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
40015809756f68c349e62687129b7622c7bf87916b1dcbab88f580ed9cae27bf
BLAKE2b-256 checksum
How to use checksums
68cbbbb1fe8a128eb251e482a4edfb0d3e4053d968cd328399eaea61316c2fc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL cyfaust-0.2.1-cp311-cp311-macosx_11_0_arm64.whl
Size 7.8 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
af8b9f1b5b3b33822a175bd248d314d2035e632f4704fb4054dd4e124f4d6da7
BLAKE2b-256 checksum
How to use checksums
9fbe45b431a8d652062a02eca1174ae12939b45d459847ff6fa680b9fda1ea45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp310-cp310-win_amd64.whl

Download URL cyfaust-0.2.1-cp310-cp310-win_amd64.whl
Size 7.2 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
c3a321e858f4bde61d33b498233afaaf8edd79b3abe7e14dff0270dee924e315
BLAKE2b-256 checksum
How to use checksums
3a1ccb6eb67d2601948568befd134dc5b403230f3644375379b8e817d58d17a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL cyfaust-0.2.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 9.3 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b30b682e1d3b7e644d76ba4ab5c353103ddabe259f9552fee8abb6a1ba1642c6
BLAKE2b-256 checksum
How to use checksums
222a97f9eea54ecc2a52bd39ae5e7ae38051e762563d9c2fcc7d00124d02b5c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / cyfaust-0.2.1-cp310-cp310-macosx_11_0_arm64.whl

Download URL cyfaust-0.2.1-cp310-cp310-macosx_11_0_arm64.whl
Size 7.8 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f065a45030fd2f0da9663ad06488bd539f56a6bf63996a72a0ec8d424d083547
BLAKE2b-256 checksum
How to use checksums
636b746513212dd5fd0bfe2a012b5786a4f69812196af3f246fab15e776a6c12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

0.2.1 This release

15 release files

0.2.0

15 release files

0.1.4

15 release files

0.1.1

10 release files

0.1.0

15 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page