←Back to Redwood Audio DSP home

JUCE 4.x for VST Plugin Development (old JUCE 3.x Tutorial)

Need Help with this Tutorial? (Contact Us)

Was this useful?  (Consider a Contribution)

Download Tutorial Source Code including built VST or the Source using AudioParameterX Classes

The following setup is done once on your development machine.  The instructions assume you are starting fresh / have no other C++ development toolchains or conflicting configurations.  The notes here are specific to Mac OSX, VST and AudioUnit (AU) plugins, to configure a Windows build machine with Visual Studio for VST plugins see the Setup tab.

 

Also note, while JUCE provides RTAS/AAX support - this requires installing and configuring Avid SDKs which are not available to everyone.  The general treatment of VST/AU discussed in this tutorial should be illustrative enough to give an idea of what would be required to setup the other formats.

 

The following instructions assume you have OSX Mavericks and can accordingly use the current Xcode 5.x.  In experimenting for these notes, it was found that juggling older versions and the needed SDK combinations was more trouble than it was worth and generally against the spirit of OSX development.  All of our notes on OSX will assume you stay up to date.   

 

1. Xcode 5

If you already have preferred JUCE compatible IDE (such as Xcode or Code::Blocks), please skip to step 2. Core Audio Utility Classes.  Otherwise,...

 

Download and install the Xcode 5 IDE from Apple's App Store (download page).  This includes many of the needed OSX SDKs.  Installation defaults should be sufficient for the IDE itself, but we will need to configure some things for the supported plugin types.

 

Note: to download the software you will be asked to add developer credentials to your Apple ID (Free) 

 

2. CoreAudio Utility Classes (AU Support)

The Core Audio SDK is included with Xcode builds - however, you will need the Core Audio Utility Classes installed in order to build AudioUnits (AU plugins) with JUCE.  If you don't want to build AU plugins, you can skip to the VST SDK configuration below. 

 

The Core Audio Utility Classes can be viewed as an extension to the Core Audio SDK, it is a collection of wrapper classes and sample code which extends the Core Audio Functionality.  For more information, see the online documentation.  Rather than manage include directories in the IDE or each project, we are going to install them directly as part of XCode. 

 

To do so, download the zip file from the top of the documentation page (direct link).  Unzip the contents and follow the instructions in the Readme.rtf - this places a copy in /Library/Developer/CoreAudio.  However, JUCE will utilize a relative path in Xcode for the default locations.  Open the "Applications" folder crtl+click Xcode and select "Show Package Contents".  Browse through Contents/Developer.  If you don't have an "Extras" folder create one.  And copy the entire CoreAudio folder inside. 

 

When complete, you will have the CoreAudio utility classes installed to

   Applications/Xcode/Contents/Developer/Extras/CoreAudio/

 

A reminder will be provided later in the tutorial - but the first time you build an AudioUnit plug-in, the build will fail.  Some of these Utility Classes have "semantic" bugs for the current version of Xcode.  Lucky for us, there is a handy auto-fix feature which will resolve all the issues.  Just step through them one at a time, select the issue (list on the left) - it will display the code, note the issue and provide a "Fix-It" Option.  Select that and continue.  This will only happen the first run through, subsequent builds will already have the corrections.

 

 

CoreAudio Utility Error Fix

 

 

Note: When JUCE builds AU plugins it will automatically deploy them to ~/Library/Audio/Plug-Ins/Components

 

3. VST Software Development Kit (SDK)

Sign up for a developer account through Steinberg (Free)

 

Download the VST 3.x Audio Plugin-Ins SDK  Note that this is different than the ASIO SDK, but you may want that later for your own use. 

 

The VST SDK download consists of a zip file with a root folder of "VST3 SDK" copy this folder to "~/SDKs/" (home folder, SDKs).  If you happen to still have your VST 2.4SDK it can be added here as well ("~/SDKs/vstsdk2.4"). If not, there are the needed files in the Current 3.x  SDK.  However, by default, the JUCE framework will look at "~/SDKs/vstsdk2.4" for the needed VST 2.x files and in "~/SDKs/VST3 SDK" for VST3 plugins.  (we will cover changing the default location in the project setup).

 

While you are at it, the SDKs folder will be a good place to save the rest of the Steingberg SDKs - at some point, you will get curious.  It is also not a bad practice to save other SDKs here and begin referencing them through environment variables etc.  But that is a topic for another day.

 

Note: This will be discussed later, but when JUCE builds from Xcode, VSTs are deployed to ~/Library/Audio/Plug-Ins/VST.  On the other hand, some hosts default to /Library/Audio/Plug-Ins/VST.  This is a subtle difference, but a headache if they don't allow setting the path to a hidden folder (require a direct browse).  You can either modify the script of each project or update your Host's VST folder (preferred).   To make ~/Library visible in a browser...

 

go to Applications/Utilities/Terminal,

at the prompt type "chflags nohidden ~/Library" without the quotes and press enter.

 

4. JUCE C++ Library and Tools

To get started using JUCE, you just need to download the libraries and new Projucer editing tool.

 

First download the JUCE library from ROLI Ltd.  You can still get a zip file of the latest stable release from here, but the main download page at JUCE.com now has easy-to-use zipped downloads with the introjucer precompiled for each platform.  I recommend copying the contents of the zip file to the root or home folder - such that you will now have all your JUCE tools at "/juce" or "~/juce".

 

If you did not get the zip with the Projucer precompiled, build the "Projucer" project - now at "/juce/extras/Projucer/Builds/MacOSX". Double-Click the *.xcodeproj file which will load the Projucer project in Xcode.  From the menu bar, select "Product", "Build For" and select "Profiling".  (or shift+command+I which is generally the shortcut to build an Xcode project in "release mode").  When the build is finished, you will have an Projucer application at "/juce/extras/Projucer/Builds/MacOSX/build/Projucer" 

 

Either way, it is best that you make an alias on your desktop or in your development hub area as you will use this to make and edit all your projects later.

 

The Projucer will be your one-stop-shop for juce-based project management.  You use the introjucer to create new projects, manage your source and project settings, and also install/update/configure JUCE library modules.  The JUCE "modules" are collections of base classes and framework needed for supporting various functions and applications such as audio plugins, drivers or graphics.

 

 

IntroJucer application window          IntroJucer application window

 

 

Once that is all done, you are ready to move on to create new projects.  Note that if you update your modules, you may be prompted by the Introjucer to come back and rebuild IntroJucer with the updated source.  The rest of this tutorial is primarily for Windows OS and VST, but we have tried to point out any key differences throughout.