vst~ inside standalone

umma08's icon

I have tried to get to the bottom of an issue, but have failed. Sorry if it is has been asked before, or the answer is obvious.

Is there a way to get a vst~ to remain in a standalone, so that another user can open the standalone without having the .vst file on their computer? and yes the vst is a freeware plugin.

this is the best i have found on the topic, but it is quite old...

i have tried including the .vst to the standalone file path when building the application, but no joy.

All the other user gets is a vst not found message in the max window.

seejayjames's icon

You don't need to add it to the standalone path, I don't think. Just manually copy the vst~ into the standalone folder after you've made the standalone and it should be able to find it. If not, you can have the user select it with the "plug" message, or you can get the standalone path by sending the

;max sendapppath

message. (Note that this is different than [thispatcher] path message.) Check "Messages to Max" in the docs to see how it works, and check the little example below.

Max Patch
Copy patch and select New From Clipboard in Max.

With that path and [sprintf] you can specify where to auto-load the vst~ (or any other files for that matter). Check [sprintf] help file for constructing the file path, there are a few gotchas.

umma08's icon

so in other words there is no way to package up the vst into the standalone?

It has to reside in a folder along with the application, and then you have to specify where the application should look for the vst, either automatically, or manually?

seejayjames's icon

As far as I know, yes, but I could be wrong. Not entirely sure what happens when you "Include File" or "Include Folder" in the Build settings sometimes. It sounds like you're incorporating it into the .mxf but I think that's only the case for some types of files...? and other ones it puts in the folder?

Example: with a matrixctrl that has an image associated with it, it seems to automatically include the image. But that's not always the case with objects and associated files...is it?

Yes, it's been a bit of a mystery for me as well...

roger.carruthers's icon

I certainly used to work that if the plug-in was at the same level as the standalone, you could loadmess it in or even use it's name as an argument; I used to use a dummy Pluggo plug to load into vst~ on start-up just to prevent a bunch of "vst~ doesn't want midi events" messages in the Max window.
Even if putting it into the package did work, it sort of seems like hiding someone else's work within your own, and I guess you should check with the plug-in's author that they're OK with it being used in this way, even if it is freeware,
Cheers
Roger

maladie's icon

Sorry to revive this topic but I've yet to actually get it to work. Personally, I don't care if the VST is or isn't visible within the max file path as I'll mostly be using this for private things. However, when I include a VST within the standalone, I know it's there because of the different sizes of the .app but I cannot find it within the search path. I tried different things on seejayjames' patch but couldn't get it to work. Any tips of more examples?

Thanks a lot

hardcoder's icon

Hi all,
here is an update to this issue:

You cannot include an VST into your standalone, neither with using "include file" nore with "include folder". Max tries to put the VST file to the mxf file of the app. But since a VST is not plain text, this does not work.

What you can do, approach 1:
- Build the standalone
- Put the vst to one of the folders in the Resources folder of your standalone or even to the same level as the executable file.

What you can do2, approach 2:
-Put the vst to a folder where apps usually store data such as %appdata% on windows
-Reference the vst using an absolute path. This works both for usage as patcher and usage as standalone

That't the current behaviour with Max 7.

I would like Cycling '74 to provide us with a more intuitive behaviour of building applications. That means for me: If you click include file, you should make sure that you can include any type of file, otherwise, you have to limit the file types to the supported file types which is not a VST apparently.


Roman Thilenius's icon


it is not only because it is not text (pictures are also not text and they can be included ;) )
it is first of all in most cases not 100% legal to redistribute code you dont own ( just sayin... yes i do it too with mda delay or some litter abstraction) and, more important, the vst~ object simply can not read files which are inside other files (not even in an applelink bundle type of document.)

last but not least: to include a plug-in document into the application which should open it is massively against the idea behind having plug-ins and plug-in interfaces. (interchangebility, upgrading to newer versions, sharing plug-ins among different hosts, freeing up RAM when not used and so on)

with the exception of some of macOS´s factory AUs nobody has ever included plug-ins in weird places such as directly in the app to hide them from the user. it just doesnt make sense. if you want to include code, write code.

hardcoder's icon

If it would be only due to copyright, that vsts cannot be included, then why can images be loaded?
There can also be a copyright on pictures. Why can wavefiles be loaded? There can also be a copyright on wavefiles, and so on.

The Max build functionality has an issue in this point. I repeat it again:
if the button says include file, then it should include the file! If it cannot or does not want to include a VST due to copyright concerns, it should give feedback to the user, that it won't include the file by intention. Instead it does nothing. I am not amused.

Don't make a wrong assumption here, that everybody wants to include vsts that they don't own? I want to include one of our own vsts from another project. They are working with VSTs, and we are working with Max and our own externals. I have my reasons to hide it from my customers and that's my usecase.

Roman Thilenius's icon


i guess because it is relatively normal to include pictures in programs - unlike plug-ins.

you can also not include a picture in a max app which isnt loaded by picture control object on initialisation - and then load it into the object later. wont work. you would have to deliver it as document or there is no path to it. :)

that you can choose files to include which in fact cant be included... could be called a design flaw. or maybe it has a reason? no idea.

i am not sure if i like the idea that you can include audio since a while. but it has been requested by many users. if you want to make a game or a wavetable synth it can be quite useful not have it to load from disk.