SynthLab SDK
Using the SDK

The SynthLab SDK consists of five folders shown below.


sdk_1.png


source

The source folder contains files for the majority of the SynthLab C++ objects in its primary folder. There are several subfolders that hold application specific C++ source code as described in the image here. The term skeleton refers to source code with all required functions setup that are mostly empty. Use these files when you are developing modules, cores, engine or voice objects "from scratch."


sdk_2.png


examples

In this guide, you will learn that the entire synth is encapsulated in the SynthEngine object; this is the sole object that your synth plugin needs to instantiate, and requires you to call only four functions on it for synth operation. The engine stores an array of SynthVoice objects that render one note event each. The examples are set for 16 notes of polyphony, but these synths are so efficient you may easily increase the voice count if you like. The examples folder contains two subfolders, each containing an engine and voice C++ object implementation. One folder is for use with this guide, the other contains the six (6) example synths, all coded into just these two objects.


sdk_3.png


wavetables

The wavetables folder contains all of the wavetables used in the example synths. Most of the example DM cores have plenty of empty slots, ready for your wavetables. The tables are orgainzed in folders shown here:


sdk_4.png


synthlab_dm

The synthlab_dm folder contains all of the module code, Visual Studio and Xcode projects, and precompiled DM modules you will need to install along with the DM synths. These folders are detailed in Creating SynthLab-DM Modules and the DM installation instructions are in Installing the SynthLab Plugins. It is worth noting here that there is an embedded folder named sdk_files that contains duplicates of some of the SynthLab files. The reason for the duplicates is that when you code DM modules, you must adhere to the same C++ objects and interfaces that the DM synths were built with – this is part of the contract that all plugin APIs require and the DM modules are actually tiny plugins that are loaded at run-time. Since it is highly likely you will want to modify some (or many) of the SynthLab source objects to match your own design paradigms (or your company's), these are isolated from the others and should not be modified. The example Visual Studio and Xcode projects all reference these files.


sdk_5.png


docs

The docs folder contains the Doxygen documentation files you are reading now.

Integrating with your projects

Regardless of how you use SynthLab and with which framework you choose, you need a strategy for storing the object files and ingtegrating them into your compiler.

Shared SDK

One way to use SynthLab is to place the SynthLab_SDK folder in a centralized location so that your Visual Studio and/or Xcode projects have easy access to all of the files and then they may share some of all of these files across the projects.

  • You need to be careful about modifying files if they may affect other projects
  • You need to add the SynthLab_SDK folder to your compiler project's "additional include folder" so your paths will work properly
  • The SynthLab-DM synths were developed using the shared SDK that resides in my ALL_SDK folder used for ASPiK plugin development

Relative Paths

There are 18 synthlab DM module projects included in the SDK along with Visual Studio and Xcode projects, pre-prepared so that you may jump right in and start writing DM modules today. There are also sample synth projects included in the examples/synthlab_examples. All of the files distributed in these directories reference each other with relative paths in their #include statements. If you use the SDK in the normal manner, you only need to set your compiler project "Additional Include Paths" to add the absolute path to the SynthLab_SDK container folder. Then, you may use the compiler's "Add Files..." function to reference the SDK files directly. If you keep the structure intact, then everything will be seamless.

The DM projects include individual Visual Studio solutions and Xcode projects for each module (18 in total) plus aggregate solutions for VS and Xcode so that you may rebuild the modules all at once if you like. The output file locations are setup to be within the SDK itself, so the whole thing is self-contained. If you prefer flattened directories for your own synth projects, then you will need to adjust the relative paths for the engine and voice objects – the others should be OK unless you want to re-locate the wavetables folder.

Wavetable Paths

The wavetables folder includes subfolders that store .h files using the SynthLabTableSet data structure for organizing the tables, table names, and lengths. Most of these tables depend on a single .h file that exposes the SynthLabTableSet structure.

  • The wavetable files need to stay in their folders relative to the ../../souce folder for access to the synthlabwtsource.h file
  • The example synth projects that use the wavetables will assume the /wavetables/ folder is in the correct place, relative to the /source/ files


    synthlab_4.png