SynthLab SDK
Project Code

All of the source code for all of the projects is contained in the SynthLab_SDK/source/ folder except the engine and voice object files. These are located in the SynthLab_SDK/examples/synthlab_examples. Rememeber that the engine and voice source files in the main SynthLab_SDK/source/ are the template files that are mostly empty. To create any of the example synths, you will need to:

  1. create your plugin framework project
  2. add the /SynthLab_SDK folder to your additional "include" directories
  3. import all of the files in SynthLab_SDK/source/ except the voice and engine files into your compiler project
  4. import the synthengine.h, synthengine.cpp, synthvoice.h and synthvoice.cpp files into your compiler project from the SynthLab_SDK/examples/synthlab_examples folder

If you keep the folder hierarchy intact, then the files will all reference each other correctly from their #include statements using relative paths. If you want to create a totally flat project folder, you will need to modify the #include statement's relative paths appropriately.

Edit the SynthVoice to Build Examples

You can build all six example synths from the same source code. This is because the only difference is in the voice object, and I've placed a few #define statements that allow the code to compile as any of the six projects. These #define statments are simple to find, as they are near the top of the synthvoice.h file.

You uncomment the #define line that represents the synth example, and comment out the other lines of code as shown in the fragment below, where I am building the PCM sample based project. All you need to do is set these #define statements and you are good to go.

// --- synthvoice.h file
#ifndef __synthVoice_h__
#define __synthVoice_h__
// --- we need these
#include "../../source/synthbase.h"
// --- components common to all SynthLab synths
#include "../../source/modmatrix.h"
#include "../../source/dca.h"
#include "../../source/lfo.h"
#include "../../source/envelopegenerator.h"
#include "../../source/synthfilter.h"
//#define SYNTHLAB_WT 1
//#define SYNTHLAB_VA 1
#define SYNTHLAB_PCM 1 // <--- uncommented
//#define SYNTHLAB_KS 1
//#define SYNTHLAB_DX 1
//#define SYNTHLAB_WS 1
// ---