Skip to content

Integration of FAUST with Audiokinetic Wwise: faust2wwise Static Compilation Tool#1167

Closed
pasquale90 wants to merge 77 commits into
grame-cncm:master-devfrom
pasquale90:faust2wwise
Closed

Integration of FAUST with Audiokinetic Wwise: faust2wwise Static Compilation Tool#1167
pasquale90 wants to merge 77 commits into
grame-cncm:master-devfrom
pasquale90:faust2wwise

Conversation

@pasquale90
Copy link
Copy Markdown
Contributor

@pasquale90 pasquale90 commented Aug 28, 2025

GSoC 2025 Final Report

This PR has been created in the context of Google Summer of Code 2025.

Contributor: Paschalis Melissas
Organization: Grame - Centre National de Création Musicale
Mentors: Stéphane Letz, Guido Fazzito
Project Title: Integration of Faust into Audiokinetic Wwise


Project Goals

This project was structured around two key deliverables:

  • faust2wwise Static Compilation Tool

    A command-line tool to convert Faust .dsp files into fully functional Wwise audio plugins (Source and Effect).

  • Embedded libfaust + LLVM JIT Compiler in Wwise

    A plugin embedding the FAUST compiler and JIT backend into Wwise, enabling dynamic live-coding of DSP code within the Wwise Authoring tool.

Work Completed

faust2wwise – Static Compilation Tool

Developed a command-line tool that generates Audiokinetic Wwise plugins from Faust DSP code, bridging the gap between the FAUST functional DSP programming language and Wwise’s audio middleware.

Supported Features:

  • Multi-platform support (Windows, MSYS2, and macOS (via implicit support for the Sound Engine portion only)).
  • Source and Effect (in-place & out-of-place) Wwise plugin generation
  • Parameter integration
  • Conditional RTPC support
  • Naming flexibility via Faust declare statements
  • Multichannel audio support for source plugins
  • Error handling
  • Testing script to validate against all Faust example files
  • Support for channel mask selection for explicit speaker configuration

Note: These features have been tested cross-platform (Windows, MSYS2, macOS). Documentation is included within the codebase, and a user manual is provided in the README file.

Limitations:

  • Bargraphs parameter support. Potential approaches are:
    • Wwise Plug-in Dialog, though note this is currently platform-dependent and only supported on Windows.
    • hbargraphs behave like sliders visually, but sliders do not output values, limiting their usefulness for feedback or monitoring.
  • Older Wwise versions not supported (<=2023.1.15)
  • macOS support for Wwise Authoring plug-ins is indirect because the Authoring application runs as a Windows binary through an adaptation layer, and therefore requires plug-ins to be built as Windows DLLs. To achieve this on macOS, you must build the Authoring plug-in on a Windows machine or VM with Visual Studio, while the Sound Engine plug-in can be built natively on macOS. (For more details, see the official documentation on macOS Plug-in Considerations)
  • faust2wwise test currently does not support the --clean option.
  • soundfile primitive is currently not supported.

Remaining Work

Embedding the Faust Compiler in Wwise (In Progress)

The next phase of the project involves integrating libfaust and the LLVM JIT backend into the Wwise Authoring app, allowing users to write Faust code directly in Wwise.

  • Initial research has been conducted.
  • Feasibility analysis along with plugin supported features establishment and the design in general are currently being evaluated.

Note: This task is being developed outside the scope of GSoC, following agreement with project mentors.

Future work

  • Continue improving faust2wwise static compilation tool based on the current limitations reported.
  • Complete the embedded compiler integration into the Wwise Authoring environment.

Credits

Special thanks to my mentors Guido Fazzito and Stéphane Letz for their guidance, code reviews, and continued support.


…sp code (no UI) and turn it into wwise plugin.

IMPORTANT:requires msys installation of faust and running msys through a windows terminal

IMPORTANT:introduces a first organised draft but inserts the following technical dept

1:The most important is the hardcodedIntegration bash function. It manipulates script in files in a non-dynamic way making a simple faust dsp program to be converted into a wwise plugin. For this, an architecture file has to be developed.

2:hardcoded paths. Unix&windows-like paths gets mixed up in a non clear way.
…ion method

- considers wwise version

- considers both plugin types (source,effect(in-place-only))

- introduces workpath for python-based integration, that leads to cross-platform compatibility between Windows and MacOs

- structured patch using 3 commands : TITLE | BELOW | REPLACE | CODE

support inject && replace operations

- standardizes DSP integration using faustdsp.cpp file

technical debt introduced with hardcoded paths remains
Supports both source and effect plugins

The method:

- extracts parameters from faust generated json file

- injects parameter code int wwise c++ template files using template tags

- updates source files and WwisePlugin/xml file

- conditional support for RTPCs using faust ui-label-metadata

This integration step was based on python implementations with minimal templating
IMPORTANT: this is the first cross platform implementation of the faust2wwise script

- create an orchestrator class to replace old bash implementation

- create cross platform scripts to allow users to use this feature with a simple `faust2wwise` command, similarly to other Faust scripts

- Implement methods for detecting Faust and Wwise paths. Note: Wwise paths must be exposed in the system using the AudioKinetic launcher → Wwise → {installed version} → Install options (tool icon) → Set environment variables.

- address technical debt introduced by previous platform-specific and hardcoded paths

- require semantical splitting of concepts into different files; maybe consider function-based implementation instead of class-based

example usage : faust2wwise dspfile.dsp <faust options>

Note: tested on Windows && MSYS environment and require further testing (i.e. MacOs)
…rors when the dsp file was outside the current dir; for instance when provided as a path/to/dspfile.dsp parameter
…rupting the naming conversion used in the integration process
…ive structure using parse_ui / parse_group / parse_items / parse_item methods. These methods are based on a TypeScript implementation found in the faustwasm repo (link : github.com/grame-cncm/faustwasm/blob/3ac9238bb0579bd2c51e67f5868997395766dbab/src/FaustWebAudioDsp.ts#L730C1-L730C30)
…acted json file from the examples dir to the project's dir
…files are additional files that get imported by other dsp files, so they have to be excluded, otherwise they are treated as separate projects
…id (for instance if starts with a number)

Faust compiles files that may start with a number, but wwise cannot handle such project names

thesolution applied is to prefix with _Dsp keyword

otherwise we simply capitalize the plugin_name variable

note: plugin name is by default initialized from the name of the dsp file. But the user is able to name a wwise project by declaring the name as a metadata from within the dsp file. This is why setting of project_name may be overriden after being initialized.
…valid (this time for when it contains spaces between words)
Note:

- all of the files that have been added in the exclusion list, cannot be compiled seamlessly with faust2wwise, but they we re tested using manual interventions that proved that they fail due to the fact that they require some additional configuration, such as including additional files, action which deviates from the faust2wwise scope
… for next semantical splitting/merging of the integration related functions
…function since the operation applied within the lua script is not that similar with the integration steps applied int he template replacement method or the parameter integration method
… a configuration file and let the files been hardcoded.

also, the faustdsp.cpp file is removed from the list, since it does not contain any placeholders within it anymore and thus not used as a template file
…p integration within template files for all types of plugins
…ng both equal (==) and non equal (!=) conditions; prepare bargraph integration
…renaming outdir in case there are other myF2Wtests directories present in the current working dir where the tests are being applied
…the readme. Now it redirects to the official repo
… testing script in macOs to hang; changed order of functions in testing class and moved platform_dependent_setup function higher closer to the constructor since it is called within it
…t not supported out-of-the-box due to the Wwise Authoring constraints that require compiling in both windows and mac and then transfering dll and xml files from the windows build into wwise plugin installation dir
@pasquale90 pasquale90 force-pushed the faust2wwise branch 2 times, most recently from 4a252be to f6919f0 Compare September 4, 2025 20:44
…elevation issue in Troubleshooting section and imrpoved the format of the whole section
… new exit code equal to zero and adjusting try-except to in faust2wwise python script to catch explicit exit system calls.

defined a new error code related to the prerequisite environmental variables in case they are not set or found or in case the sys call fails to retrieve them.
@sletz
Copy link
Copy Markdown
Member

sletz commented Sep 8, 2025

Finally merged in --squash mode in 8a26474.

@sletz sletz closed this Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants