Question

I want to build a VST plugin on OSX. I can compile it just fine, but the VST-host (Cubase Essential 4) always crashes when trying to load it or reports that the plugin is somehow broken.
Probably, this is because I am missing some ingredients to the VST-bundle.

Which preferences need to be set in XCode and what stuff has to be put into the bundle to make this work? Or is there even a sample project somewhere?

Thank you in advance

Was it helpful?

Solution

I have written up a guide for developing VST plugins by hand on Mac OSX here:

Making a VST plugin from scratch with Xcode

Also I have developed a set of Xcode project templates which you can use which do all of this for you and simply give you a base project for VST effects/instruments:

Teragon Audio Xcode VST Templates

Both of these are written for the VST 2.x SDK, as I have not worked with the 3.x SDK and am not using any sequencers which have migrated to it yet.

OTHER TIPS

I searched the net looking for complete guide on how to build VST2 plugin using Xcode and found some guides, especially guide in previous post by Nik was useful, but some steps were missing in them (Ex. Ableton Live 9.1.1 doesn't see plugin without step 3), some were redundant. So I decided to write complete guide for most recent Xcode.

Complete guide for creating optimized VST2 plugin using Xcode 5 on OSX

  1. Download VST SDK, it can be VST3 sdk (3.6 in my case), vst2.x folder is still there. Unpack it and put to folder Documents/Xcode so that it looks Documents/Xcode/VST3 SDK
  2. Open Xcode. Create New Project OSX -> Framework & Library -> Bundle Choose Cocoa Framework in dialog.
  3. When the project is created, in Info tab:
    • Add new key Resource should be file-mapped with value YES
  4. In Build Settings tab:
    • Deployment -> Deployment Location -> set Yes
    • Deployment -> Deployment Postprocessing -> set Yes
    • Deployment -> Installation Built Products Location -> set /
    • Deployment -> Installation Directory -> set /Library/Audio/Plug-Ins/VST
    • Packaging -> Wrapper Extension -> set vst
    • Search Paths -> Header Search Paths -> add path "$(HOME)/Documents/Xcode/VST3 SDK" with quotes, with recursive flag
  5. Menu -> Product -> Scheme -> Edit Scheme -> Run -> Info -> Build Configuration -> set Release
  6. Drag vst2.x folder from VST3 SDK/public.sdk/source/ to project tree. In adding files dialog:
    • uncheck Copy items into destination group's folder
    • check Create groups for any added folder
    • check your project in Add to targets
  7. Add your .h and .cpp files for your effect or instrument. You can simply add again.h and again.cpp files from https: //github.com/kn0ll/vst-2.4-xcode-examples just to check.
  8. Press Run (it may warn about inappropriate typecast in SDK source - let Xcode fix it)

This guide covers everything you asked and more.

The sample project at VST3 SDK/public.sdk/samples/vst/mac could also be a good place to start.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top