SynthLab SDK
|
Creating SynthLab-DM projects in Xcode is simple and easy. These instructions are for Xcode 12 but should be the same for other versions. The DM core files include two (PCMSample.h and PCMSample.cpp) for PCM sample support that require the Corefoundation framework, which comes with the compiler. When you are done, you will have a very small and simple project that builds a dylib. 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.
In Xcode use:
Here is the Framework setup:
And here is the Build Phase for copying an oscillator dylib to the prescribed folder; alter the syntax as needed.
At this point, the compiler settings are done, and you only need to add the files from the corefiles folder.
Add DM Core Files
You have two choices here: make copies of the core files and use those, or share the core files with other projects. Here we will make a copy and use that. Later on, you can share the files across projects as you like.
Add DM Core Files
You need the two DLL support files along with the files that contain the ModuleCore C++ object. First, copy the two DLL files from the SynthLab_SDK/synthlab_dm/dll_support_files/ into your project folder, then in Xcode's navigator, right-click and choose "Add files to //your project//" to import the files
Then, 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 Xcode's navigator, right-click and choose "Add files to //your project//" to import the files
Or, 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 Xcode's navigator, right-click and choose "Add files to //your project//" to import the files which really contain a clone of the SDK object of choice
Add SDK Files
Next, add the necessary SDK files 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 library; the core files are set to give you an empty ModuleCore by default, found in the synthlabcore.h and .cpp files. 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 __.dylib__ file from the local /Debug/ or /Release/ folder into the SynthLabModules folder in your main plugin binary folder as per the instructions at the start of this guide. Start SynthLab-DM and find your new ModuleCore in the appropriate location to test and develop.