Path of the DAW project file

Is there a way to find the project path of the daw project my plugin is currently running in? I need to save some audio files, and as these audio files are related to the project I want to save them into the project folder (or project audio folder). That way these files are also copied/moved if someone copies/moves the project folder.

Melodyne is saving the transfered files to the project folder. In earlier versions of Melodyne this was not really working well and you had to set the path manually every time. Somehow they managed to get this right (at least on my system).

I would need something similar.

1 Like

Sorry to raise a dead thread; did you ever figure out how to do this or come up with an acceptable solution?

No, there’s no way to do that. It doesn’t make any sense as there’s obviously no universal concept of a “project file” that would have any kind of meaning for all DAWs.

Thanks for the reply, Jules. Is there a practical limit to how much data should be stored in the plugin state? Say I wanted to store a minute or two of WAV data (~30MB) for a sampler-like plugin? Seems kind of large but it would be nice to sidestep the process of asking the user to save and load a file.

See my similar question here.

Well there was a plugin format that supported this feature. I’m not really sure how much I’m allowed to tell about that so I will not mention any names :wink: Anyway, that plugin format is obsolete now. Even in Celemony Melodyne you’ve got to select a path to store your files in. Melodyne is kind of managing the files, but there are circumstances under which files that are not used any longer are not deleted. If a plugin is removed from an insert slot it cannot really tell why this happens. Is it moved from one insert slot to another (some DAW reinstantiate in such a case), is the plugin removed or is the session closing? Somehow this behavior seems to work for most Melodyne users, so I guess I’ll implement something similar. Maybe I’m going to save the path in a SharedResourcePointer, so you just have to set the path once in a session.

Re: maximum data size, it’ll depend on the DAW, but you’ll probably comfortably get away with sizes up to about 50MB on modern machines. If you can efficiently compress the data that could be helpful, as you have to bear in mind that even though 50MB isn’t very much data on its own, a user’s project may contain many plugins, and the data size adds up.

On 64-bit OSes there’s probably not really an upper limit, except in DAWs that aren’t written to be 64-bit aware, but obviously if you use gigabytes of data then things will get very very slow!

Great, thank you. I don’t plan on exceeding 50MB, but if someone wanted to really stress test my plugin it might get close. I’ll report back here if I run into any issues.