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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cyfaust-0.2.0-cp314-cp314-win_amd64.whl (7.1 MB view details)

Uploaded CPython 3.14Windows x86-64

cyfaust-0.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cyfaust-0.2.0-cp314-cp314-macosx_11_0_arm64.whl (7.6 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

cyfaust-0.2.0-cp313-cp313-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.13Windows x86-64

cyfaust-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cyfaust-0.2.0-cp313-cp313-macosx_11_0_arm64.whl (7.6 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

cyfaust-0.2.0-cp312-cp312-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.12Windows x86-64

cyfaust-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cyfaust-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (7.6 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

cyfaust-0.2.0-cp311-cp311-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.11Windows x86-64

cyfaust-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cyfaust-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (7.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

cyfaust-0.2.0-cp310-cp310-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.10Windows x86-64

cyfaust-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cyfaust-0.2.0-cp310-cp310-macosx_11_0_arm64.whl (7.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file cyfaust-0.2.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: cyfaust-0.2.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 7.1 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for cyfaust-0.2.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 06627d5d375e8c3048b83d112eac7784207dbac237d983c8c6822c7b6d60a577
MD5 f919cbe39640d38e4aa78257acc0dde2
BLAKE2b-256 ec3aefd63359721c188768fa6efc20253824c6d3c91d2e043bee292013b3da46

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyfaust-0.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6cdbb3350a3904a6148434439ff0f745c3caeeee974346e127a31f99db753cf6
MD5 403123f6fda47f21d618b6da8d8c4d7d
BLAKE2b-256 571cd5dcfccf116df0bf2abfc61bf03428593dada75b1004d5b0ffd054eeb95e

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cyfaust-0.2.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d1a368bfc3b62eb5db54bec63f10b81cbda9a0be8f8162f1e6cde4beca5e32d2
MD5 97139087a531f184c7062b416baae110
BLAKE2b-256 17afbad53dfcf8f6d57cff7776c7b307e9191df3826917388894cf60294ee8ee

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: cyfaust-0.2.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for cyfaust-0.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2fdcd8a3ba9bc2bc3690f9a21d680d001a53e24520093af390096d79a98b6004
MD5 ff699e3de957c4620a74786aa6c5aa02
BLAKE2b-256 0b37a9eb1d111987566cfca37d82769113a55db12dd1da4e983b7ea5f3e308b3

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyfaust-0.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8b99c8910d6561cafd9b03382351a677147f18d69b27ac078eed69777ba12d12
MD5 2073d856333437717956cb13c6df6625
BLAKE2b-256 6225149e5d1ddd1ad39569ce6d9b9bd63e816d172e2077170036547e7ca12023

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cyfaust-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 245aa00073c0bb0dfca1c71d0ff0ef15e7494e91c9cf806fb963ccc5fad605b1
MD5 3b16bc9789f746f36066cf16cadc2716
BLAKE2b-256 c3b24bb5bf3434462bfb66a07fa7dd68854ab1da1ff33fd70ac5bb7829320ec3

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: cyfaust-0.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for cyfaust-0.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f00135acfb1dafd89d652cce574f0b6694384b255d5bfac5b1cec0f6b94b8e58
MD5 2960d49e0624200e2d89fb919fb32ebe
BLAKE2b-256 b9dae528b7f17e7d13fd2c0f30b1654c50bdeffb558ad2a731c36a826b5e0600

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyfaust-0.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c8e4dece3198529f569006323a7bc90e3a49dfe23c9fb9263cdd64d23bb4285d
MD5 986f85fc4408c49628aed5897ea91bab
BLAKE2b-256 e8ecb22d6dc82a0ced46e28746c597d1b7188515d2e0d762507699de985e41f7

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cyfaust-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0b3febc43fa4af88d7f46828d3ad0dbcba1189e1eff7ecddee7afe0b21810326
MD5 21fbd41df116fc82030d29357c8c43a7
BLAKE2b-256 301aa0f325334bf7d7169582796134565a8061a0795fc67e5567c0d823107696

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: cyfaust-0.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for cyfaust-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f29c95931438f86d0f6713a0ddd0209610f03df192ad2cb2fbdc0d5a868cbbdb
MD5 1e2adfd2dfeece859adcac0eab18f8a6
BLAKE2b-256 314e5011ef54179b8033f3c9b6043e0bb3a95460a07a16a5f13b6afccb2fea93

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyfaust-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 813cfcb43a2b3d74e6561147f8aa416aee5e38812f3a29aff816bdd96e838eb3
MD5 789c890df8e8023405502b978336eb96
BLAKE2b-256 502892301a555091999d4aee6039d745659aa118b636a8143ff9da4eddbdb182

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cyfaust-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d7d0791de73997ee2f16abddf088d8b462a9e0e748acf3c07135968d09d944d3
MD5 da3784b941303de28c6514e858f54409
BLAKE2b-256 4f84beddefc0060dd76a348eb7a8b0fdb4df3e238cd48e6212051c79bec92cb9

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: cyfaust-0.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for cyfaust-0.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 92795046ff64b74610181dcfa76c7918eb8759635647c218320be0ed6869648a
MD5 9f06df3d047bd21685fefa3b80ebaeaa
BLAKE2b-256 68a5d28e01822a524175b9b61f25f8fd8dde716e8bf4e490d8419e7576580eae

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cyfaust-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5952c4f0500761b16e4df71d8fc6f4ce4210da380e6212e682677749d57bed01
MD5 7ea591cce8410a499334832541f5ade6
BLAKE2b-256 2d23e42087c6a5974cc075494cc9915eae872138a52bc86133f23feeebc1524e

See more details on using hashes here.

File details

Details for the file cyfaust-0.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cyfaust-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ac60f00511eeeb769e91176e4cadb85351ce214d3593377f5a51bcdd6a42165e
MD5 be952c79b2a82c6a3e0b4626098d38e6
BLAKE2b-256 c91b61488f79274a09a675e73d9444287f24891f26dbcd95911fc83b5afc5426

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

15 files

0.1.4

15 files

0.1.3

15 files

0.1.2

16 files

0.1.1

10 files

0.1.0

15 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