{"id":20020487,"url":"https://github.com/shakfu/cyfaust","last_synced_at":"2026-06-13T12:02:45.607Z","repository":{"id":214489686,"uuid":"736624612","full_name":"shakfu/cyfaust","owner":"shakfu","description":"A cross-platform cython wrapper of the faust interpreter with rtaudio.","archived":false,"fork":false,"pushed_at":"2026-06-09T06:33:36.000Z","size":6547,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-06-09T08:25:25.867Z","etag":null,"topics":["audio","cython","dsp","faust","faust-dsp","python","rtaudio"],"latest_commit_sha":null,"homepage":"https://shakfu.github.io/cyfaust/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shakfu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-28T12:12:32.000Z","updated_at":"2026-06-09T06:33:40.000Z","dependencies_parsed_at":"2025-08-30T13:09:27.801Z","dependency_job_id":"0da2ab21-6e54-4687-ab91-80b23068c54f","html_url":"https://github.com/shakfu/cyfaust","commit_stats":null,"previous_names":["shakfu/cyfaust"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/shakfu/cyfaust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakfu%2Fcyfaust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakfu%2Fcyfaust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakfu%2Fcyfaust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakfu%2Fcyfaust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shakfu","download_url":"https://codeload.github.com/shakfu/cyfaust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakfu%2Fcyfaust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34283391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","cython","dsp","faust","faust-dsp","python","rtaudio"],"created_at":"2024-11-13T08:32:35.992Z","updated_at":"2026-06-13T12:02:45.548Z","avatar_url":"https://github.com/shakfu.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cyfaust\n\nThe cyfaust project provides a minimal, modular, self-contained, cross-platform [cython](https://github.com/cython/cython) wrapper of the [Faust](https://github.com/grame-cncm/faust) DSP language and the [RtAudio](https://github.com/thestk/rtaudio) cross-platform audio driver.\n\n- **Dual Backends**: Interpreter (default, ~8MB) or LLVM JIT (~33MB, faster execution)\n- **Box API**: Fully wrapped with both functional and object-oriented interfaces\n- **Signal API**: Fully wrapped with both functional and object-oriented interfaces\n- **Platform Support**: macOS, Linux, and Windows\n- **Build Variants**: Dynamic (`libfaust.so|dylib`) and static (`libfaust.a|lib`)\n- **Faust Version**: `2.85.5`\n- **Documentation**: [cyfaust-docs](https://shakfu.github.io/cyfaust/)\n\n## Installation\n\nTo install cyfaust with the faust interpreter backend (default):\n\n```sh\npip install cyfaust\n```\n\nTo install with the LLVM JIT backend:\n\n```sh\npip install cyfaust-llvm\n```\n\n## Features\n\n- Python-oriented cross-platform implementation of the [Faust](https://faustdoc.grame.fr/manual/embedding/) DSP language\n\n- **Two backend options**:\n  - **Interpreter** (default): Compact ~8MB binary, good for development and most use cases\n  - **LLVM JIT**: ~33MB binary with native code compilation for maximum performance\n\n- Provides the following submodules (in the default build):\n\n  - `cyfaust.interp`: wraps the faust interpreter and the rtaudio audio driver\n\n  - `cyfaust.box`: wraps the [faust box api](https://faustdoc.grame.fr/tutorials/box-api/)\n\n  - `cyfaust.signal`: wraps the [faust signal api](https://faustdoc.grame.fr/tutorials/signal-api/)\n\n  - `cyfaust.common`: common utilities and classes\n\n- Self-contained, minimal, and modular design\n\n- Can generate code using the following backends: c++, c, rust, codebox\n\n- Can generate auxiliary files such as SVG block diagrams of DSP\n\n- Dual functional/OO design for box and signal APIs with minimal code duplication\n\n- Implements [Memoryviews](https://cython.readthedocs.io/en/latest/src/userguide/memoryviews.html) for read/write buffer using `numpy` or `array.array`\n\n- Both dynamic and static build variants can be packaged as a self-contained python wheel\n\n- Command-line interface for common operations\n\n## Quick Start\n\n```python\nfrom cyfaust.interp import create_dsp_factory_from_string, RtAudioDriver\nimport time\n\n# Define Faust DSP code\ncode = \"\"\"\nimport(\"stdfaust.lib\");\nprocess = os.osc(440);\n\"\"\"\n\n# Create factory and DSP instance\nfactory = create_dsp_factory_from_string(\"osc\", code)\ndsp = factory.create_dsp_instance()\ndsp.init(48000)\n\n# Play through speakers\ndriver = RtAudioDriver(48000, 256)\ndriver.init(dsp)\ndriver.start()\ntime.sleep(2)\ndriver.stop()\n```\n\nSee the [Getting Started](https://shakfu.github.io/cyfaust/getting-started/) guide and [Examples](https://shakfu.github.io/cyfaust/examples/) for more usage patterns including the Box API, Signal API, buffer computation, and serialization.\n\n## Command-Line Interface\n\ncyfaust provides a CLI accessible via the `cyfaust` command or `python -m cyfaust`:\n\n```bash\ncyfaust \u003ccommand\u003e [options]\n```\n\n| Command | Description |\n|---------|-------------|\n| `version` | Show cyfaust and libfaust version information |\n| `info` | Display DSP metadata, inputs, outputs, and dependencies |\n| `compile` | Compile Faust DSP to target backend (cpp, c, rust, codebox) |\n| `expand` | Expand Faust DSP to self-contained code with all imports resolved |\n| `diagram` | Generate SVG block diagrams |\n| `play` | Play a DSP file with RtAudio |\n| `params` | List all DSP parameters (sliders, buttons, etc.) |\n| `validate` | Check a DSP file for errors |\n| `bitcode` | Save/load compiled DSP as bitcode for faster loading |\n| `json` | Export DSP metadata as JSON |\n\nExamples:\n\n```bash\ncyfaust play osc.dsp -d 5                     # play for 5 seconds\ncyfaust compile synth.dsp -b cpp -o synth.cpp  # compile to C++\ncyfaust params synth.dsp                       # list parameters\ncyfaust json instrument.dsp --pretty           # export metadata\ncyfaust validate filter.dsp --strict           # check for errors\n```\n\nSee the full [CLI Reference](https://shakfu.github.io/cyfaust/cli/) for all options.\n\n## Building from Source\n\n```bash\ngit clone https://github.com/shakfu/cyfaust.git\ncd cyfaust\nmake        # builds libfaust + installs for development\nmake test   # run tests\n```\n\nCommon build targets:\n\n```bash\nmake                   # dynamic interpreter build (default)\nmake STATIC=1 build    # static interpreter build\nmake build-llvm        # static LLVM build\nmake wheel             # build wheel\nmake wheel-llvm        # build LLVM wheel (cyfaust-llvm)\nmake wheel-windows     # Windows one-shot (deps + wheel + delvewheel)\n```\n\nBuild options (set via `make VAR=1`):\n\n| Option | Default | Description |\n|--------|---------|-------------|\n| `STATIC` | 0 | Build with static `libfaust` |\n| `LLVM` | 0 | Build with LLVM backend (requires `STATIC=1`) |\n| `INCLUDE_SNDFILE` | 1 | Include sndfile support |\n| `ALSA` | 1 | ALSA audio (Linux) |\n| `PULSE` | 0 | PulseAudio (Linux) |\n| `JACK` | 0 | JACK (Linux/macOS) |\n| `WASAPI` | 1 | WASAPI (Windows) |\n| `ASIO` | 0 | ASIO (Windows) |\n| `DSOUND` | 0 | DirectSound (Windows) |\n\n### Windows\n\nOn Windows, use the provided build script:\n\n```bash\npython scripts/build_windows.py              # static wheel (default)\npython scripts/build_windows.py --dynamic    # dynamic wheel (bundles faust.dll)\npython scripts/build_windows.py --clean      # clean first, then build\npython scripts/build_windows.py --test       # build + install + run tests\n```\n\nIf you have GNU Make installed, `make wheel-windows` also works for dynamic wheels.\n\nPrerequisites: Visual Studio 2022 (or MSVC Build Tools), Python 3.10+, [uv](https://docs.astral.sh/uv/), and CMake.\n\nSee the full [Building from Source](https://shakfu.github.io/cyfaust/building/) guide for platform prerequisites, LLVM backend details, and wheel building instructions.\n\n## Platform Support\n\n**Interpreter backend (cyfaust):**\n\n| Platform | Architecture | Status |\n|----------|-------------|--------|\n| macOS | arm64 (Apple Silicon) | Supported |\n| macOS | x86_64 (Intel) | Supported |\n| Linux | x86_64 | Supported |\n| Linux | aarch64 | Supported |\n| Windows | x86_64 | Supported |\n\n**LLVM backend (cyfaust-llvm):**\n\n| Platform | Architecture | Status |\n|----------|-------------|--------|\n| macOS | arm64 (Apple Silicon) | Supported |\n| macOS | x86_64 (Intel) | Supported |\n| Linux | x86_64 | Supported |\n| Linux | aarch64 | Supported |\n| Windows | x86_64 | Planned |\n\n## Prior Art of Faust + Python\n\n- [DawDreamer](https://github.com/DBraun/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)\n\n- [faust_python](https://github.com/marcecj/faust_python) by Marc Joliet: A Python FAUST wrapper implemented using the CFFI (updated 2015). There's a more recent (updated in 2019) [fork](https://github.com/hrtlacek/faust_python) by Patrik Lechner. (cffi)\n\n- [pyfaust](https://github.com/amstan/pyfaust) by Alexandru Stan: Embed Faust DSP Programs in Python. (cffi)\n\n- [faust-ctypes](https://gitlab.com/adud2/faust-ctypes): a port of Marc Joliet's FaustPy from CFFI to Ctypes. (ctypes)\n\n- [faustpp](https://github.com/jpcima/faustpp): A post-processor for faust, which enables more flexible code generation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakfu%2Fcyfaust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshakfu%2Fcyfaust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakfu%2Fcyfaust/lists"}