Cabbage Logo
Back to Cabbage Site

Batch convert on Mac

Hi Rory, is there a way to direct the Cabbage host what to batch convert? It seems to only want to convert some specific folders’ contents from the built-in examples. It would also be nice if it could retain the folder structure in the exported plugins.
Maybe this isn’t really supported. I found some old documentation that says it is Windows only.

Not currently, but I did start a command line batch convert tool that I can return too if you’re interested. I think it would provide much better scope than a UI based one as users can specify multiple folders. I can also take a look at somehow retaining the folder structure.

That’d be great. Just when you’ve got time :slightly_smiling_face:

1 Like

I’ve updated the command line exporter tool. It’s contained with the folder. Although it’s a simple one file, one export utility, it can be called within a script that will propagate through folders. Its usage is given below:

CLIConverter --export-TYPE="name of csd file" --destination="some absolute or relative directory"

TYPE is one of the following: VST, VSTi, VST3, VST3i, AUMIDIFx, AUi, and AU

  • If you leave out the destination, exports will be placed into the same folder as the .csd file

A typical example might look like this:

./CLIConverter --export-VST="~/Csoundfiles/SuperPlug2000.csd" --destination="~/Documents/ExportedPlugins"

I’m happy to put together a script to provide the functionality that you are looking for. I could do in Python or as a plain old bash script?

Thank you for this, Rory. I’ll try it out and let you know if I encounter any problems :slightly_smiling_face:

Let me know. Like I said, I’m happy to throw together a script for you if you give me the deets. :+1: You an see it as a thank you for all the super instruments you contribute to the Cabbage cause :muscle:

Just using this now. Can you help me out with a script that will rifle through folders and subfolders creating plugins for all csds it encounters, as you offered!

:rofl: I sure did. Leave it with me and I’ll throw something together. I might put it together with python, that Ok?

Sure, thanks!

Here you go. To use it

python type 'path to csd directory' 'output directory' [sign]

type can be VST, VSTi, AU, etc. If sign is added, an attempt will be made to ad-hoc codesign the exported plugins if you’re on MacOS. Right now all files will be bundled into the output directory, but now that I think about it, you wanted to maintain the folder structure or? I can do that, but it will be another day I’m afraid. (2.4 KB) (Updated 18:57, 23rd Sept 2023)

I know that you were just testing me, but on line 32 I needed to change Windows to Darwin

        elif platform.system() == "Darwin":

It creates the VSTs but when scanning them in Reaper, Reaper says it quits unexpectedly. It doesn’t actually quit, but the plugin remains unavailable. I’ve tried VST and VST3 and with and without ‘sign’.
Creating a single VST from the Cabbage app still works fine for Reaper (interestingly, ad-hoc signing no longer seems necessary). I have been comparing CLIConverter plugins and Cabbage UI-created plugins but am struggling to spot the difference that Reaper can.

I also noticed that the batch converter will create VSTs of the CSDs contained within VSTs. I guess this could be regarded as undesired behaviour.

In the meantime, I’ll keep fiddling with it to see if I can track down the problem.

Thanks Iain for the feedback. Did you try signing the plugins yourself? i had to do this yesterday to get them seen. I am not sure I tested with the sign function as I didn’t have much time. Also, Cabage will try to adhoc sign by default, so perhaps that is why they work when exported directly from there?

Ok, so GUI Cabbage is now producing the same error when I unselect ‘ad-hoc signing…’. It’s strange as it didn’t seem to do it the first time. Anyway, is seems that lack of signing with the batch converter is the problem.
I’m not sure how to go about signing many plugins easily. I think I figured out a way of doing one at a time a while back.

I think I have this working now. Turns out I was construct the codesign command, but not actually calling it :rofl: I also added a check to make sure the csd isn’t inside an existing plugin. I’ve updated the python script above.

I was still having problems with this. I discovered that it isn’t working for VST3s but is for VSTs.

It seems to only work completely on one folder at a time, and CSDs in subfolders don’t seem to work/be signed. To be honest, this is workable, it’ll just takes a little longer or require moving all CSD into the one location.

Just updated the script again. It should now work for VST3 as well. But I didn’t have time to look into the multiple folders thing yet. I will take a look tomorrow.

1 Like