Skip to content

ChristosKonstantas/Audio-Plugin-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Audio-Plugin-Template

Overview

Audio-Plugin-Template is a JUCE-based audio plugin starter template designed for accelerating development. It provides a straightforward structure and automates common setup tasks, allowing you to focus on your plugin code rather than boilerplate configuration.

  • Supports local JUCE checkout (via JUCE_LIB) or automatic fetching using CMake FetchContent (if environment variable JUCE_LIB is not set).

    If you want to set the environment variable execute:

    Windows (Powershell)

    Temporary:

    $env:JUCE_LIB="\absolute\path\to\JUCE"
    

    Persistent:

    setx JUCE_LIB "\absolute\path\to\JUCE"
    

    Linux / macOS

    Temporary (current shell session only):

    export JUCE_LIB="/absolute/path/to/JUCE"
    

    Persistent (add to ~/.bashrc, ~/.zshrc, etc):

    echo 'export JUCE_LIB="/absolute/path/to/JUCE"' >> ~/.bashrc
    source ~/.bashrc
    

    Define the environment variable JUCE_LIB to reference the JUCE source root directory (the directory containing CMakeLists.txt and modules/).

    If you use a different environment variable name in your build system, replace JUCE_LIB in CMakeLists.txt accordingly with your defined environment variable name.

  • JUCE modules are statically linked into the plugin for easy distribution, thus object code is embedded into your plugin binary. But, the plugin itself is a dynamic library.

  • The project is structured to allow easy renaming of plugin classes, files, and CMake targets via a simple JSON configuration in config/config.json.

Instructions

Step 1 - Configure your Plugin (Optional)

Before building the plugin, customize your settings in config/config.json.

Example config.json:

{
  "plugin_name": "NewPlugin",
  "company_name": "NewCompany",
  "plugin_code": "0000",
  "manufacturer_code": "AAAA",
  "is_synth": false,
  "needs_midi_input": false,
  "needs_midi_output": false,
  "formats": "VST3",
}

Notes:

  • plugin_name is used for class names, includes, and CMake targets.

  • plugin_code and manufacturer_code must be 4-character strings.

Once configured, run the script to apply all renames automatically:

python config.py

Note: This script should be run once on a fresh clone. It renames directories, files, class names, includes, and updates CMake targets according to config.json.

Step 2 - Build Project

You can build the plugin in Debug or Release mode. In your project root directory execute:

Debug

cmake -B build
cmake --build build

Release

cmake -B build
cmake --build build --config Release

Step 3 - Run and Test

The plugin will be available in the chosen format (VST3 by default). You can open it in your DAW for testing but make sure to copy build\plugin\PluginTemplate_artefacts\Debug\VST3\PluginTemplate.vst3 folder in C:\Program Files\Common Files\VST3 if you are using Windows, or just add the path to VST Plugin paths in your DAW and rescan for new plugins. This video is helpful if you want to see how to use the Visual Studio Debugger with Reaper (but of course you can choose any other DAW of your preference).

Notes and Best Practices

  • Valid Plugin Name: Ensure plugin_name is a valid C++ identifier (letters, digits, underscores; cannot start with a digit).

  • Cleaning Builds: After renaming via config.py, delete the build directory before rebuilding to avoid stale CMake references.

About

audio-plugin-template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors