Error Generating Audio Plugin: Could Not Save Plugin

I'm running Matlab 2022b on MacOS 13.3.1. I was able to validate and test bench the example audio plugin myEchoPlugin described here, but whenever I try to generate a VST, I get the following error:
% Error using generateAudioPlugin
% Could not save plugin to
% '/Users/[my username]/Documents/MATLAB/DSP/FinalProject/myEchoPlugin.vst': The location
% '/private/var/folders/xl/s9qhk75168q919lvdzfzhfvh0000gn/T/tp0816faa2_06ac_460c_8946_497f7801e13d/Builds/MacOSX/build/Release/myEchoPlugin.vst'
% was not found.
% The location may be read-only or locked by a DAW process.
% Error in generateAudioPlugin
I tracked down /private/var/folders/xl/s9qhk75168q919lvdzfzhfvh0000gn/T and tried adding read/write permissions, but I couldn't find the tp0816faa2_06ac_460c_8946_497f7801e13d directory. My user already has read/write permissions in the current folder /FinalProject, and I don't know what else to do. The plugin works fine in the test bench. Why am I getting this error? Which location is causing the problem, the current folder or the one in /private? If the location is locked by a DAW process, how do I unlock it?

5 Comments

Try this command:
>> generateAudioPlugin audiopluginexample.Echo
What version of xcode are you using? Is this an Intel or a newer M1-type processor?
Does it make a difference if you use the -outdir <dirname> and -output <resultname> options?
What if you try to generate a standalone executable (with the -exe option)?
Do you have a codegen license? (not usually required, but can be useful to pinpoint what is going on here)
Another thing to try is make sure you are running the command from a folder you can write to.
I have Xcode 14.3 on an Intel i5 processor.
>> generateAudioPlugin audiopluginexample.Echo produced the same error as before.
I successfully made a standalone executable for audiopluginexample.Echo (and the original file I wanted) using -exe. This also worked with -outdir and -output, but these options made no difference trying to generate a VST or AU.
I don't have codegen, do you think that's necessary?
Since the -exe worked in the current folder, can I assume that the write permissions aren't the problem?
I tried with Xcode 14.3 and I see the problem (14.2 was OK). The behavior of the new xcode has changed, it writes the plugin directly to the proper mac folder (ex: /Users/myUserName/Library/Audio/Plug-Ins/VST/) and creates a symbolic link in the usual destination. Looks like the copy errors, but the plugin is still in the user's plugin directory.
So the workaround would be to grab the plugin from your plugin directory, or use xcode 14.2. I'm creating a bug report for this. Thanks for letting us know.
Edit: looks like auv3 works with xcode 14.3, in addition to exe.
Awesome, thank you! I downloaded R2023a to generate the auv3 and it worked. I was even able to use it in garageband after opening the plugin from the Finder window at least once. I'm still not seeing anything in /Library/Audio/Plug-Ins/VST/ when I leave out the options, but I guess that could be something else on my end, and I'm happy with an auv3.
It would be in your user folder (~/Library, not /Library).
In MATLAB, try this after the failure (with the name of your plugin instead of Echo) :
>> copyfile ~/Library/Audio/Plug-Ins/VST/Echo.vst Echo.vst

Sign in to comment.

Answers (0)

Categories

Find more on Audio Plugin Creation and Hosting in Help Center and File Exchange

Products

Release

R2022b

Asked:

on 10 Apr 2023

Commented:

on 27 Apr 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!