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 variableJUCE_LIBis 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 ~/.bashrcDefine the environment variable
JUCE_LIBto reference the JUCE source root directory (the directory containingCMakeLists.txtandmodules/).If you use a different environment variable name in your build system, replace
JUCE_LIBinCMakeLists.txtaccordingly 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.
Before building the plugin, customize your settings in config/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_nameis used for class names, includes, and CMake targets. -
plugin_codeandmanufacturer_codemust 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.
You can build the plugin in Debug or Release mode. In your project root directory execute:
cmake -B build
cmake --build build
cmake -B build
cmake --build build --config Release
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).
-
Valid Plugin Name: Ensure
plugin_nameis 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.