ASPiK SDK
Loading...
Searching...
No Matches
Optional: Manual Project Creation

DIY Project Creation
If you'd like to create your plugin project by hand, you can do that with the SDK as well. The steps are outlined in Designing Audio Effects Plugins in C++ 2nd Ed. by Will Pirkle and are repeated here.

Step 1: Copy the TemplatePlugin
Copy and paste the TemplatePlugin folder into your ASPiK project folder. Change the name of the folder to a new name that makes sense for the project. Make sure it is a valid CMake name (no spaces, no oddball characters, no numbers).

Step 2: Edit the CMake File
Open the outermost CMakeLists.txt file in any text editor and alter the variables at the top of the file according to your plugin needs. In the example here, we are setting up a project for the book's IIRFilters plugin:

At the top of the file are the names of the SDK root folders and they will be preset to the names we used in Section 6.2 and will look like this:

# --- Here you can set the names of your UNIVERSAL SDK folders <br>
set(UNI_AAX_SDK_FOLDER AAX_SDK)
set(UNI_AU_SDK_FOLDER AU_SDK)
set(UNI_VST3_SDK_FOLDER VST_SDK/VST3_SDK)

These folder names are only needed for universal projects where you target one or more SDKs and you use the outside myprojects folder in Section 6.2.5. If you are targeting individual APIs, you don’t need to bother with the naming as CMake uses relative path locations. The next section contains the build flags. Here is where you choose which APIs to target for the compiler. The settings below show a VST-only build setting. The UNIVERSAL_SDK_BUILD flag is set to FALSE (for an individual build) and the VST_SDK_BUILD flag is set to TRUE, indicating that API as the target.

# --- Universal Build Flag - when using combined SDKs
set(UNIVERSAL_SDK_BUILD FALSE) # <-- set TRUE or FALSE
# Individual project builds<br>
set(AAX_SDK_BUILD FALSE) # <-- set TRUE or FALSE
set(AU_SDK_BUILD FALSE) # <-- set TRUE or FALSE
set(VST_SDK_BUILD TRUE) # <-- set TRUE or FALSE

To build a Universal project that targets VST and AU, you would set these flags accordingly:

# --- Universal Build Flag - when using combined SDKs
set(UNIVERSAL_SDK_BUILD TRUE)# <-- set TRUE or FALSE
# --- Individual project builds
set(AAX_SDK_BUILD FALSE) # <-- set TRUE or FALSE<br>
set(AU_SDK_BUILD TRUE) # <-- set TRUE or FALSE<br>
set(VST_SDK_BUILD TRUE) # <-- set TRUE or FALSE
#

With the build flags set, you can finish the edits with the project information. These values are set in the next section of the file and are generally self-explanatory. The first is the compiler project name (IIRFilters) and this project name must not contain whitespaces or special characters.

# --- the name of the project must be valid CMAKE name: set PROJECT NAME with or without quotes
set(PLUGIN_PROJECT_NAME IIRFilters)
#

The next edit is for the plugin name that the DAW will expose to the user; here we are calling it the Filterizer. Notice that this name contains quotes and can be the same as or different than the iroject name. You can include whitespaces, numbers, other characters, or almost anything else in this text description.

# --- the name of the PLUGIN as you want it to appear in DAW: set PLUGIN NAME with quotes<br>
set(PLUGIN_NAME "Filterizer")
#

The next edit is for identifying the plugin as a FX or Synth plugin. It uses a boolean flag to identify the synth-ness of the project. A synth plugin only has outputs and does not process an audio input (unless it is a sidechain). All projects in this book are FX plugins.

# --- Synth Flag: FALSE = FX plugin, TRUE = Synth Plugin<br>
set(IS_SYNTH_PLUGIN FALSE) # <-- set Synth Flag
#

Then, you need to fill in your vendor (company) information

# --- VENDOR information (your company stuff)
set(VENDOR_NAME "Plugin Makers") # <-- required!<br>
set(VENDOR_URL "www.yourcompany.com") # <-- OPTIONAL (ok if blank)<br>
set(VENDOR_EMAIL "help@yourcompany.com")# <-- OPTIONAL (ok if blank)

Next, you need to set some special four-character codes that are required for identification in the various APIs. You need to be careful here, and be sure to change the codes for each plugin you develop. You can use combinations of capital and lower case letters and numbers or other characters.

# --- 4-Character Codes (for AAX and VST3): MUST be unique for each plugin your company creates/sells<br>
set(4CHAR_CODE "IIR1")
# --- your company CODE (does NOT need to be unique for each plugin)<br>
set(4CHAR_MANUFACTURER_ID "PLMK")
# --- MUST be unique for each AAX plugin your company creates/sells<br>
set(4CHAR_AAX_PRODUCT_ID "iir1")
#

Lastly, there are some plugin options that need to be set. First is the audio processing (see Frame, Buffer and Sub-Block Processing); here I am settign up sub-block procssing of 64 samples at a time:

# --- Plugin Options ---
set(PROCESS_FRAMES FALSE) # <-- set TRUE or FALSE
set(PROCESS_BUFFERS FALSE) # <-- set TRUE or FALSE
set(PROCESS_BLOCKS TRUE) # <-- set TRUE or FALSE
set(BLOCK_SIZE 64) # <-- numerical, in samples (per channel) if using blocks
###

The next option is for side chaining. If you would like the DAW to expose side chain inputs to your plugin, set the EXPOSE_SIDECHAIN flag to TRUE, otherwise false. Our volume plugin won’t need it so we will set it to FALSE here.

# --- expose SC<br>
(EXPOSE_SIDECHAIN FALSE) </strong># <-- set TRUE or FALSE
#

Next is the latency setting in samples. This is a special setting for lookahead compressors or FFT processing plugins that necessarily introduce a latency or time-delay to the audio signal. Set this parameter in samples.

# --- LATENCY for lookahead plugins<br>
set(LATENCY_IN_SAMPLES 0) # <-- numerical, in samples
#

The tail time may be set so that you can hear your reverb or delay tails. For VST3, there is an option for an infinite tail – it this variable is set to true, the DAW will run a continuous stream of zeros through your plugin forever after the user stops playback the very first time. We’ll use a default tail time of 1 second here, even though our volume plugin won’t need a tail and we’ll set the VST3 infinite tail to FALSE.

# --- tail-time for reverb/delay plugins<br>
set(TAIL_TIME_MSEC 1000) # <-- numerical, in mSec
# --- VST3 options: infinite tail (DAW keeps streaming forever)<br>
set(VST3_INFINITE_TAIL FALSE)
#

The last option involves sample accurate automation for VST3 plugins only. For our IIRFilters plugin, we will leave this in their default settings of no sample accurate automation and a granularity of 1 sample.

#
set(VST3_SAMPLE_ACCURATE_AUTOMATION FALSE)
set(VST3_SAMPLE_ACCURATE_GRANULARITY 1)
#

There are three more flags to set – one will automatically include the fxobjects.h and fxobjects.cpp files to integrate the book C++ objects into your project. The next is for linking with the FFTW library for the advanced plugins in Chapters 20 and 22. Note that you must install FFTW on your system prior to setting the link flag.

# --- more flags <br>
set(INCLUDE_FX_OBJECTS TRUE) # <-- set TRUE or FALSE<br>
set(LINK_FFTW FALSE) # <-- set TRUE or FALSE<br>
#

AAX Plugin Category
The AAX plugin category is coded as an unsigned integer and based on a list of plugin codes. If you use the ASPiKreator software, you can see this list in the drop-down combo box. The encoding from the documentation is:
AAX_ePlugInCategory_None = 0x00000000,
AAX_ePlugInCategory_EQ = 0x00000001, ///< Equalization
AAX_ePlugInCategory_Dynamics = 0x00000002, ///< Compressor, expander, limiter, etc.
AAX_ePlugInCategory_PitchShift = 0x00000004, ///< Pitch processing
AAX_ePlugInCategory_Reverb = 0x00000008, ///< Reverberation and room/space simulation
AAX_ePlugInCategory_Delay = 0x00000010, ///< Delay and echo
AAX_ePlugInCategory_Modulation = 0x00000020, ///< Phasing, flanging, chorus, etc.
AAX_ePlugInCategory_Harmonic = 0x00000040, ///< Distortion, saturation, and harmonic enhancement
AAX_ePlugInCategory_NoiseReduction = 0x00000080, ///< Noise reduction
AAX_ePlugInCategory_Dither = 0x00000100, ///< Dither, noise shaping, etc.
AAX_ePlugInCategory_SoundField = 0x00000200, ///< Pan, auto-pan, upmix and downmix, and surround handling
AAX_ePlugInCategory_HWGenerators = 0x00000400, ///< Fixed hardware audio sources such as SampleCell
AAX_ePlugInCategory_SWGenerators = 0x00000800, ///< Virtual instruments and other software audio sources
AAX_ePlugInCategory_WrappedPlugin = 0x00001000, ///< All plug-ins wrapped by a third party wrapper
AAX_EPlugInCategory_Effect = 0x00002000, ///< Special effects

#
set(AAX_CATEGORY 0) # <-- see AAX Category codes in ASPiK SDK Documentation
#

That’s all there is to editing this file unless you want to make changes regarding the relative locations of the SDK folders or other tweaks. Be sure to visit www.willpirkle.com for these instructions if you are interested. Now you can save the file and we can run CMake to finish off the project process.