Skip to content

Instantly share code, notes, and snippets.

@olilarkin
Last active Apr 21, 2021
Embed
What would you like to do?
Plugin Dev Notes

VST3

VST3 SDK docs are online here: https://steinbergmedia.github.io/vst3_doc/vstinterfaces/index.html

macOS

Xcode

Since recent xcode/macOS versions you can get a lot of security prompts when debugging. This can reduce that

sudo /usr/sbin/DevToolsSecurity --enable

v2 audiounits

  • Logic X will cache the I/O configuration of a plug-in with its version number, so if you change your AU's channel I/O, you also need to bump the version number for Logic to show it in the correct places (e.g. mono only au on a mono track fx slot)
  • since macOS High Sierra and the APFS filesystem change auval will not detect newly installed (v2) audiounits without a restart. To fix this you can run killall -9 AudioComponentRegistrar to force rescan.
  • /usr/bin/auval is a script which calls the command line app /usr/bin/auvaltool
  • on recent macOS auval cannot be launched from xcode in order to debug a plugin due to System Integrity Protection. Copying /usr/bin/auvaltool elsewhere e.g. ~/auvaltool will allow auval to be launched, as long as "Debug Executable" is unchecked.
  • In order to debug it properly and hit breakpoints, codesign the copied auvaltool with your own Mac Developer ID codesign -fs "Mac Developer" ~/auvaltool
  • auval in recent versions of iterm2 will only show apple's aus, not third party. Disable Prefs > Advanced > Allow sessions to survive logging out and back in, to fix that.
  • running auval with the -comp argument will test using the deprecated component manager entry point, rather than the more recent AUPluginFactory
  • Manufacturer 4Char codes must contain at least one uppercase character

v3 audiounits "Audio Unit Extensions"

  • AUv3s are "app extensions" which behave in a very different way to v2 "components" on macOS. Instead of the binaries living in /Library/Audio/Plug-Ins/Components and ~/Library/Audio/Plug-Ins/Components, they are inside a .app bundle, in the subfolder "Plugins", so when you want to build a plugin, you need also to build a .app, even if that app doesn't do much (it delivers the plugin). This is the same on iOS. The plug-in (.appex) is registered by pluginkit when the parent application launches by double clicking, or running from the Xcode debugger. Once that plug-in has been registered it should show up in auval. You can also check with the pluginkit command line app to see if its registered, and the location of the .app and .appex e.g, to look for the apple example auv3, you can grep the bundle id (pluginkit will show all sorts of app extensions):

oli-mbp:~ oli$ pluginkit -mv | grep com.example.apple-samplecode

com.example.apple-samplecode.AUv3Filter686EDA2T8T.AUv3FilterExtension(1.0) 7A404127-C24B-47F1-A309-55E8E74BBABA 2019-07-23 10:19:00 +0000 /Users/oli/Library/Developer/Xcode/DerivedData/xx/Build/Products/Debug/AUv3Filter.app/Contents/PlugIns/AUv3FilterExtension.appex

  • when you trash the .app, the appex will be unregistered, and after a short while it will no longer appear when running auval

AUM developer Jonatan Liljedahl has some good AUv3 iOS notes here: http://devnotes.kymatica.com

https://developer.apple.com/videos/play/wwdc2015/508/ https://devstreaming-cdn.apple.com/videos/wwdc/2015/508691kyzp/508/508_audio_unit_extensions.pdf?dl=1 https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/AudioUnit.html https://medium.com/better-programming/create-audio-unit-extension-from-scratch-77abee79d12 https://developer.apple.com/documentation/audiotoolbox/creating_custom_audio_effects https://developer.apple.com/documentation/audiotoolbox/incorporating_audio_effects_and_instruments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment