SynthLab SDK
SynthLab-DM Windows

There are example projects for all DM cores, but at some point you will want to start creating your own from scratch. Creating SynthLab-DM projects in Visual Studio is easy and nearly identical from VS2015 to VS2019. You first create a new blank project, and then modify it to become a DLL project. This is actually simpler than creating a new DLL project, and then removing a bunch of code and compiler settings to make it compatible. SynthLab-DM projects are simpler than you think, not more complicated. The process for VS2017 and VS2019 are nearly identical, only differing in Microsoft's naming conventions of some of the compiler settings. When you are done, you will have a very small and simple project that builds a DLL. Note that you use the same set of sdk files for both MacOS and Windows and there are no compiler pre-processor commands or special link settings.


new_DM_win_1.png


SynthLab-DM Project: Visual Studio 2017

You will be mainly targeting the x64 configuration, unless you want to use these modules with RackAFX plugins, in which case you need to target Win32 (aka x86).

  1. File -> New Project
  2. Visual C++ -> General -> Empty Project
  3. Set Name and Folder location, then create the project
  4. When the the VS project opens, go to
  • Solution Explorer -> Properties
  • Choose All Configurations from the top drop list
  • General -> Project Defaults -> Configuration Type: change to "Dynamic Library (dll)"
  • General -> Character Set -> Use Multi-Byte Character Set
  1. Apply changes to the x64 Configurations
  2. Apply changes to the Win32 Configuration if you want to build a DM for RackAFX plugins
  3. OPTIONAL add a post build rule to the VS project to copy the DLL to its final destination; see the example module solutions for help

SynthLab-DM Project: Visual Studio 2019

  1. File -> New Project
  2. Choose the C++ Empty Project
  3. Set Name and Folder location, then create the project
  4. When the the VS project opens, go to
  • Solution Explorer -> Properties
  • Choose All Configurations from the top drop list
  • General -> General Properties -> Configuration Type: change to "Dynamic Library (dll)"
  • Advanced -> Character Set -> Use Multi-Byte Character Set
  1. Apply changes to the x64 Configurations
  2. Apply changes to the Win32 Configuration if you want to build a DM for RackAFX plugins
  3. OPTIONAL add a post build rule to the VS project to copy the DLL to its final destination; see the example module solutions for help

The Post-Build rule syntax is below; alter it as needed for your module type (here it is for the oscillators):

//
copy /Y "$(OutDir)$(TargetName)$(TargetExt)" "..\..\..\..\dm_modules\x64\SynthLabModules\windows\oscillators\$(TargetName)$(TargetExt)"
//

At this point, the process is the same for any Visual Studio project.

Add DM Core Files
You need the two DLL support files along with the files that contain the ModuleCore C++ oject. First: copy the two DLL files from the SynthLab_SDK/synthlab_dm/dll_support_files/ into your project folder, then in the VS solution Explorer, right-click and use Add -> Existing Item to import these files

  • synthlabdll.h
  • synthlabdll.cpp

If starting from scratch: copy the two template files from SynthLab_SDK/source/core_templates/ into your project folder; these are blank files with just the skeleton code you need to implement a ModuleCore from scratch, then in the VS solution Explorer, right-click and use Add -> Existing Item to import these files

  • synthlabcore.h
  • synthlabcore.cpp

If cloning an existing core: choose the two core files from the SDK (e.g. classicwtcore.h and classicwtcore.cpp) and copy them into your project folder, changing their names to synthlabcore.h and synthlabcore.cpp. Then with a text editor, open the files and change all occurrances of the class name (e.g. ClassicWTCore here) to SynthLabCore. Make sure to change the name of the #included .h file while you are at it. Then in the VS solution Explorer, right-click and use Add -> Existing Item to import these files, which really contain a clone of the SDK files

  • synthlabcore.h
  • synthlabcore.cpp

Add the SDK Files
Next, add the necessary SDK files (from the special sdk_files folder) for your DM project. You may use the example projects to get started. Most of these projects will require around 10 files depending on type. The example projects and this documentation will help you figure out what you need. When in doubt, just add ALL of the sdk_files to your project; all of the example projects will build from these same sets of files, even if not needed. But ultimately you want to pare down the set of files to a minimum.

And, every DM core project will require an identical set of "core" files to start:

Do a Test Build
Rebuild the DLL; the core files are set to give you an empty ModuleCore by default, found in the synthlabcore.h and .cpp files, make sure to choose the proper configuration (all SynthLab products for AU and VST3 are x64, while RackAFX modules are x86). When this builds successfully, if you are re-packaging an existing ModuleCore, then you may follow the steps in the previous section regarding altering the project for your new module name.

Test the DM
Copy the DLL file from the local SynthLabModules folder into the SynthLabModules folder in your main plugin binary folder as per the instructions above. Start SynthLab-DM and find your new ModuleCore in the appropriate preferred slot to test and develop.


synthlab_4.png