-
Notifications
You must be signed in to change notification settings - Fork 20
Faust
Yann Orlarey's Faust is a functional programming language for real-time sound processing and synthesis developed at Grame and distributed as GPL'ed software. With Faust you can develop signal processing algorithms in a high-level functional language, but still achieve a performance comparable to carefully handcrafted C routines.
Pure provides tight integration with Faust through its built-in Faust interface which can be used both to inline Faust code in Pure scripts and to load external Faust modules in LLVM bitcode format dynamically at runtime.
There's also a separate pure-faust addon module which can be used either with the built-in Faust interface or with external Faust modules available in shared library format.
To work with Faust you'll need a Faust installation, of course. You basically have the following options there:
- Use the mainline Faust compiler, available on Github. This is required to build Faust modules for an abundance of different target environments, including Pure, and to utilize Pure's built-in Faust interface and Faust inlining capabilities.
- Use FaustLive, Grame's stand-alone graphical frontend to the Faust compiler, which doesn't need any external compiler toolchain and lets you compile and run Faust dsps on the fly.
- Use Grame's online compiler or the Faust IDE, which both allow you to create the source code of a Faust dsp, compile it to an abundance of different targets, and download the compiled dsp to your machine.
- Use the Faust playground, a graphical editor which lets you create Faust programs, runs them right in your web browser, and supports the same export targets as the online compiler.
While the other options provide awesome environments for rapid prototyping and creating plugins for various targets, only the mainline Faust compiler currently has the capability to produce Pure modules, so that's the one that you should get and install on your system.
Pretty much any Faust version >= 0.9.67 will do the job. Use either the pure.cpp or the pure.c architecture to create a shared module (dll on Windows) which can then be loaded in Pure using the pure-faust add-on module.
However, to utilize Pure's internal Faust interface, which allows the inlining of Faust code in Pure scripts and the loading of Faust LLVM bitcode files, you'll need a Faust version which is linked against the same LLVM version that Pure uses, which means LLVM version 3.5 at this time. The last version of Faust which still works with LLVM 3.5 is somewhere around the (unreleased) 2.11.14 version, for which packages are available, see below.
At the time of this writing, the following ready-made packages and ports for Linux, Mac OS X and Windows are available.
-
Arch Linux: Thanks to the work of David Runge, the faust package is available in the standard Arch repositories now. We also offer a few additional packages (faust-git, faustlive-git) in the AUR which are built from current git sources, and we provide a Faust 2.11.14 package linked against LLVM 3.5 in our Arch OBS Repository, please check the Pure on Arch Linux wiki page for details.
-
Debian/Ubuntu: Reasonably recent Faust versions are available in the standard repositories since Debian 10 and Ubuntu 20.04. We also provide a Faust 2.11.14 package linked against LLVM 3.5 in our Debian/Ubuntu OBS Repositories, please check the Pure on Debian/Ubuntu wiki page for details.
-
Windows: There is an (older, 32 bit) MSI package of Faust version 2.5.21 ready to be used along our Pure MSI package for Windows, please check the Pure on Windows wiki page for details.
-
Mac OS X: The faust, faust-devel, and faustlive-devel ports can be installed from MacPorts which also hosts a complete set of Pure packages, please check the Pure on Mac OS X wiki page for details.
NOTES:
- The Pure package in MacPorts is linked against LLVM 3.4 rather than LLVM 3.5, because LLVM 3.5 doesn't work all that great on some macOS versions.
- The faust package is currently at 2.5.23, the faust-devel package at 2.11.14.
- None of these are linked against LLVM 3.4 by default, but you can download the faust-devel port from Github and change the Portfile to enforce compilation with LLVM 3.4. This should still work even on the latest macOS versions. TODO: Provide a ready-made Portfile for that configuration.