Skip to content

About

A CMake template project for developing custom FMOD DSP plugins in C++.

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

Repository files navigation

FMOD CMake Plugins

A CMake template project for developing custom FMOD DSP plugins in C++.

Build And Test

screenshot.png

Verified FMOD Programmers API Version: 2.03.15

Overview

This project provides a structure for creating cross-platform FMOD DSP plugins in C++.
It contains the boilerplate code required to interface with FMOD's DSP callback API, and defines a clean separation between interface, state, and data. DSP helper functions are implemented in standalone libraries: a header-only DSP math library (libs/ans_dsp) and a static library of FMOD helpers (libs/ans_fmod_dsp).

Prerequisites

  • CMake 3.30 or higher
  • FMOD Core API (download here)
  • C++20 compatible compiler

Getting Started

  1. Clone the repository:
    git clone https://github.com/horacv/FmodCMake_Plugins.git
    cd FmodCMake_Plugins
    
  2. Download and install the FMOD Core API with tools/setup_fmod_api.py (see tools/readme.md), or download it manually and copy the files as described in libs/fmod/core/readme.md.
  3. Configure and build with CMake (see commands below).

CMake build commands

  • Debug: cmake -B build/debug -DCMAKE_BUILD_TYPE=Debug && cmake --build build/debug
  • Release: cmake -B build/release -DCMAKE_BUILD_TYPE=Release && cmake --build build/release

Project Structure

.
├── CMakeLists.txt        # Main CMake configuration
├── libs/                 # Helper libraries for DSP processing
│   ├── ans_dsp/          # Base DSP functionality (Common, Filters, Noise, Oscillators, Smoothing)
│   ├── ans_fmod_dsp/     # FMOD-specific DSP utilities
│   └── fmod/             # FMOD API headers and libraries
├── plugins/              # DSP plugin implementations
│   ├── passthrough/      # Example plugin — no processing
│   ├── gain/             # Gain / trim
│   ├── lpf_1p/           # One-pole low-pass filter
│   ├── hpf_1p/           # One-pole high-pass filter
│   ├── lpf_2p/           # Two-pole low-pass filter
│   ├── hpf_2p/           # Two-pole high-pass filter
│   ├── eq_4b/            # 4-band parametric EQ
│   ├── delay/            # Delay / echo
│   └── tone_generator/   # Tone generator (Sine, Saw, Triangle, Square, Noise)
├── fmod_project/         # FMOD Studio project files (empty, ignored by default)
└── tools/                # Python scripts for setting up the FMOD API

Plugin Examples

Plugin Description
passthrough Minimal example plugin; passes audio through unmodified. Good starting point for a new plugin.
gain Simple gain/trim with parameter smoothing.
lpf_1p / hpf_1p One-pole low-pass and high-pass filters.
lpf_2p / hpf_2p Two-pole (biquad) low-pass and high-pass filters.
eq_4b 4-band parametric EQ using cascaded biquads (HPF/low shelf, two peaking bands, LPF/high shelf).
delay Delay/echo with feedback, built on a circular ring buffer.
tone_generator Tone generator producing sine, saw, triangle, square waves and white noise.

Adding a New Plugin

  1. Add a new subdirectory under plugins/, modeled on passthrough/ or an existing plugin.
  2. Replace the namespace name with the name of your plugin, not the classes.
  3. Write your DSP processing in the '_state' class.
  4. Write the UI definition in the '.plugin.js' file.
  5. Register the new plugin target in CMakeLists.txt.

Using Plugins in FMOD Studio

  1. Open FMOD Studio.
  2. Create a new project or open an existing one.
  3. Go to Edit -> Preferences -> Assets.
  4. In the Plug-ins folder, enter the folder where your plugin binaries (.dll/.dylib/.so) and their .plugin.js files are built. Each plugin is built into its own folder, for example C:/FmodCMake_Plugins/build/debug/plugins/gain/ (with Visual Studio generators, a further Debug/ or Release/ subfolder).
  5. Enjoy.

Official Documentation and Helpful Links

About

A CMake template project for developing custom FMOD DSP plugins in C++.

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

Contributors

Languages