2

I'm just trying to get my foot inside the OSX world after recently getting a MAC.

Over the past months i haven't successfully built a working VST 2.4 yet. I simply dont get why: the projects in the vst examples work (somewhat) out of the box, but my own projects fail to work.

I've mirrored every build setting exactly (including info.plist and pkginfo), double checked that the contents of the vst.app is identical, correctly gets build as vst with correct extensions etc., and the code is virtually the same, however my vst doesn't get recognized in any of the hosts i tried. The commandline even is identical for the build. I've tested my VST with the included minihost vst tester, and it passes and works - but still wont be recognized. I even checked the exported symbols with nm and they look correct (ie. createEffectInstance is correctly exported).

What gives? There must be some hidden build setting somewhere that i haven't discovered that seems to disqualify my VST.

Shaggi
  • 1,121
  • 1
  • 9
  • 31

2 Answers2

1

Probably the most obvious but overlooked setting: are you building as 32 or 64 bit? You need to make sure that the bitness matches your host, otherwise the plugin won't be loaded (which, btw, might explain why the plugin could load in your self-built minihost and not another sequencer). To ensure compatibility with most hosts, I'd go for 32-bit build.

Also, here's a tutorial I wrote on the subject awhile back. However, you claim that you are doing everything correct with the Info.plist and whatnot, but perhaps you missed a small step:

http://teragonaudio.com/article/Making-a-VST-plugin-from-scratch-with-Xcode.html

Another potentially useful tool is MrsWatson (disclaimer: I'm the author of that program). It's a command-line VST host which can be used to provide diagnostic information about VST's, and also is designed for plugin testing and debugging. Because of the 32/64 bit difficulties with plugins, on Mac OSX the program ships separate 32 & 64 bit binaries rather than using a universal binary.

You should try running the following command on your plugin:

mrswatson --verbose --plugin /path/to/wherever/you/put/the/plugin.vst --display-info

If you see a list of parameters and other info, then it should be kosher and able to be loaded in most sequencers. Hope this gets you on the right track!

Nik Reiman
  • 39,067
  • 29
  • 104
  • 160
  • Hey, i was actually hoping/wondering you would come by :) As a matter of fact, i used your template for starting up the project. And yes, the architecture is correct sadly (has to be both 32 and 64 bit). I remember looking at mrswatson, ill try it out soon and report back (it works with 64 bit right?). – Shaggi Feb 28 '14 at 11:28
  • @Shaggi Sadly my Xcode VST templates are quite out of date; I don't do much Mac coding these days so I don't think they work with modern Xcode anymore. :( And yes, MrsWatson is 64-bit compatible. – Nik Reiman Mar 02 '14 at 12:03
  • Okay, i'll look into it. – Shaggi Mar 02 '14 at 15:54
0

Try using your debugger to watch what Dispatcher() calls your host makes. Check if there are any differences between your plugin and the included example projects. In my experience a host will usually abort loading a plugin immediately after a Dispatcher() call raises an exception or returns a result the host doesn't like for whatever reason.

Shannon Matthews
  • 9,649
  • 7
  • 44
  • 75
  • I currently can only test it in ableton live, where i can't even try to load the plugin. I'm not sure how i would be able to 'force' load the vst. Otherwise, i would have to debug ableton while it is starting (where it checks for new plugins) - not sure how to do that – Shaggi Mar 02 '14 at 15:53
  • I normally resort to `OutputDebugString()` or something similar when I can't use a debugger. Does OSX have something similar to `OutputDebugString()`? – Shannon Matthews Mar 03 '14 at 04:24
  • The VST scanning stage during host start up is usually the only place available to debug a non-loading plugin. Most hosts don't allow 'force' loading of plugins and AFAIK Ableton Live is no exception. – Shannon Matthews Mar 03 '14 at 04:37
  • 1
    I have no idea, just got this mac. Anyway i confirmed that the plugin does infact get loaded, as in, the createEffectInstance method is called. So i guess I'll have to intercept somehow and debug my way through it. – Shaggi Mar 03 '14 at 11:37
  • How i wish hosts would just leave a trace of debugging / error messages. What kind of program doesn't even show an error. If only ableton at least would acknowledge the existence of my plugin :( – Shaggi Mar 03 '14 at 11:58