So, after Apple switched the processors for the macintosh it looks like more windows only developers are thinking to port their plug-ins to the mac. I will try to give some short tips for new VST mac developers.
How to start a new fresh project in Xcode:
- Use the “Carbon Bundle” template when creating a new project.
- Open the target settings and change the build setting “Wrapper Extension” from ‘bundle’ to ‘vst’. (Don’t forget to change the configuration to ‘All Configurations’ before)
- Add a “Header Search Path” to the root of the VST 2.4 sdk.
- Add the sdk sources and headers to the project.
You should be able to build the target now with only one linker error :
Undefined symbols:
“createEffectInstance(int (*)(AEffect*, int, int, int, void*, float))”, referenced from: _VSTPluginMain in vstplugmain.o
As an experienced vst developer, you know that this is actually the entry function which will be called by the host to instantiate the vst plug-in. So add your own source files to the project and try to build it.
Next tip will be coming next week.
Thanks for nice tips. Some newbie questions… I’m pretty new to c++ and plugin programming and even more so to Mac.
I’ve managed to compile my plugin for both windows and osx, but it won’t show up in Cubase 4.
I’ve followed the instructions at http://www.niallmoody.com/ndcplugs/xcodetutorial.htm
I’ve read that 2.4 hosts looks for VSTPluginMain and not the main_macho, where do I make these changes ?
Current entry method looks like:
AudioEffect* createEffectInstance (audioMasterCallback audioMaster)
{
return new FreeChain (audioMaster);
}
Thanks for any help!
This is mainly what you need to do. Just place a breakpoint in createEffectInstance and start the debugger and see if it breaks. If not than VSTPluginMain is not exported right. And for Cubase 4 delete the Vst2xPlugins.xml and Vst2xBlacklist.xml from its preferences before starting the debugger.