This project demonstrates how to transform a standalone JUCE audio application into a professional audio plugin that can be loaded in Digital Audio Workstations (DAWs).
├── Source/
│ ├── AudioEngine.h/cpp # Core audio processing engine
│ ├── PluginProcessor.h/cpp # Plugin AudioProcessor implementation
│ ├── PluginEditor.h/cpp # Plugin GUI editor
│ ├── MainComponent.h/cpp # Standalone app GUI (legacy)
│ └── Main.cpp # Standalone app entry point
├── tutorials/
│ └── Module_04_Plugin_Architecture.md # Comprehensive tutorial
├── CMakeLists.txt # Build configuration
├── build_plugin.sh # Build script
└── README_Plugin.md # This file
- Multi-format Support: VST3, AU, and Standalone builds
- Real-time Audio Generation: Sine wave generator with configurable parameters
- Host Integration: Full parameter automation support
- Professional GUI: Embedded editor with modern styling
- State Management: Save/load plugin state and presets
- Volume: 0.0 to 1.0 (linear scale)
- Frequency: 20 Hz to 20 kHz (logarithmic scale)
- Wave Type: Sine, Square, Sawtooth, Triangle (future implementation)
- CMake 3.15 or higher
- C++17 compatible compiler
- JUCE framework (included as submodule)
- Platform-specific requirements:
- macOS: Xcode command line tools
- Windows: Visual Studio 2019 or higher
- Linux: GCC or Clang
chmod +x build_plugin.sh
./build_plugin.shmkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config ReleaseAfter successful build, you'll find:
- VST3:
build/JUCEAudioGenerator_artefacts/Release/VST3/JUCEAudioGenerator.vst3 - AU:
build/JUCEAudioGenerator_artefacts/Release/AU/JUCEAudioGenerator.component - Standalone:
build/JUCEAudioGenerator_artefacts/Release/Standalone/JUCEAudioGenerator
# VST3
cp -r build/JUCEAudioGenerator_artefacts/Release/VST3/JUCEAudioGenerator.vst3 ~/Library/Audio/Plug-Ins/VST3/
# Audio Unit
cp -r build/JUCEAudioGenerator_artefacts/Release/AU/JUCEAudioGenerator.component ~/Library/Audio/Plug-Ins/Components/# VST3
copy "build\JUCEAudioGenerator_artefacts\Release\VST3\JUCEAudioGenerator.vst3" "C:\Program Files\Common Files\VST3\"# VST3
cp -r build/JUCEAudioGenerator_artefacts/Release/VST3/JUCEAudioGenerator.vst3 ~/.vst3/- Install the plugin to your system's plugin directory
- Launch your DAW (Logic Pro, Ableton Live, Reaper, etc.)
- Scan for new plugins or restart the DAW
- Create a new audio track
- Load "JUCE Audio Generator" as an instrument or effect
- Adjust the Volume and Frequency parameters
- Test parameter automation by recording parameter changes
Run the standalone version directly:
# macOS
open build/JUCEAudioGenerator_artefacts/Release/Standalone/JUCEAudioGenerator.app
# Windows
build\JUCEAudioGenerator_artefacts\Release\Standalone\JUCEAudioGenerator.exe
# Linux
./build/JUCEAudioGenerator_artefacts/Release/Standalone/JUCEAudioGenerator- Implements JUCE's
AudioProcessorinterface - Manages plugin parameters using
AudioProcessorValueTreeState - Integrates with existing
AudioEnginefor audio processing - Handles plugin lifecycle (prepare, process, release)
- Manages state save/load functionality
- Implements JUCE's
AudioProcessorEditorinterface - Provides GUI controls for plugin parameters
- Uses parameter attachments for automatic synchronization
- Handles host integration and resizing
- AudioProcessorValueTreeState: Manages all plugin parameters
- Parameter Attachments: Automatic GUI-parameter synchronization
- Parameter Smoothing: Prevents audio artifacts during parameter changes
- Host Automation: Full support for DAW automation systems
- Audio I/O: Host provides audio buffers instead of managing audio devices
- Parameters: Host-automatable parameters instead of internal state
- GUI: Embedded editor instead of independent window
- Lifecycle: Host controls plugin instantiation and destruction
- Threading: Uses host's audio thread instead of managing own thread
Test your plugin with:
- macOS:
auval -v aufx JAGn Flab(for AU plugins) - Windows: Use plugin validation tools in your DAW
- Cross-platform: Test in multiple DAWs for compatibility
- Verify plugin is installed in correct directory
- Check plugin format compatibility (VST3 vs AU)
- Restart DAW or rescan plugins
- Check plugin validation logs
- Optimize audio processing in
processBlock() - Use parameter smoothing for parameter changes
- Avoid memory allocation in audio thread
- Profile CPU usage
- Test editor resizing in different hosts
- Verify parameter attachments are working
- Check component visibility and bounds
- Test with different host scaling factors
- Tutorial: See
tutorials/Module_04_Plugin_Architecture.mdfor comprehensive guide - JUCE Documentation: https://docs.juce.com/
- Plugin Standards: VST3 SDK, Audio Unit Programming Guide
- Community: JUCE Forum, Audio Developer Community
This project is for educational purposes. Please refer to JUCE licensing terms for commercial use.
This is an educational project. Feel free to extend it with:
- Additional waveform types
- More sophisticated parameter controls
- Advanced audio effects
- MIDI input support
- Preset management system