If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Plugin Path
5 posts
• Page 1 of 1
Plugin Path
Here's a general question I've wondered ...
If we create a VST plugin that we load up into a DAW session ...
Can we obtain the FOLDER that the DAW project is loaded from ?
[not talking of the location the VST is installed].
thanks
If we create a VST plugin that we load up into a DAW session ...
Can we obtain the FOLDER that the DAW project is loaded from ?
[not talking of the location the VST is installed].
thanks
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Plugin Path
I dont think so. How would a vst know where your project is?
- adamszabo
- Posts: 667
- Joined: Sun Jul 11, 2010 7:21 am
Re: Plugin Path
adamszabo wrote:I dont think so. How would a vst know where your project is?
yeah ... I was kinda thinking if there was an 'Environment' type call to the DAW ... similar to API calls used in Reaper.
I need to look at Saving some converted data [stored in the PreSet Manager] to the DAW Project Folder.
Guess I need to read up on the Folder, Dir, etc PRIMS in FS.
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Plugin Path
The nearest thing that I can see in Steinberg's VST plugin documentation is a function for getting the path to the currently loaded preset (if it was loaded from a file, and it returns an absolute, not relative, path). However, as far as I can tell, that's VST3 only, and even then, FS would need to expose the function call as a primitive or Ruby method.
You can take a peek at the environment variables of the current process by formatting the contents of Ruby's global ENV Hash in a RubyEdit and outputting to a text viewer (make sure it's scrollable!)...
...and you can query the current working directory...
There can be some useful global values there, but usually nothing dynamically changed during run-time; and even if what you need does happen to be there, it would likely be application specific, so won't migrate between different hosts (FWIW, I've checked these before for Reaper and VSTHost.)
The nearest solution that I've ever found for this is to store the directory path as a VST string preset so that it's saved with the project; but of course, if you move the project, you then have to update the path manually and re-save (i.e. using a file/directory dialogue.)
You can take a peek at the environment variables of the current process by formatting the contents of Ruby's global ENV Hash in a RubyEdit and outputting to a text viewer (make sure it's scrollable!)...
- Code: Select all
output ENV.map{|name, value| "#{name} = #{value}"}.join("\r\n")
# NB) Access a specific value by de-referencing the name as a String...
appdata_folder = ENV["APPDATA"]
...and you can query the current working directory...
- Code: Select all
output Dir.getwd
There can be some useful global values there, but usually nothing dynamically changed during run-time; and even if what you need does happen to be there, it would likely be application specific, so won't migrate between different hosts (FWIW, I've checked these before for Reaper and VSTHost.)
The nearest solution that I've ever found for this is to store the directory path as a VST string preset so that it's saved with the project; but of course, if you move the project, you then have to update the path manually and re-save (i.e. using a file/directory dialogue.)
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Plugin Path
this is a great idea considering not all want to configure an installer and install path. Infact I used to work with preg replace and expressions in such a way so that it could be configured to check for ini docs and if non existant to actually write them wherever the file is moved to. remind me of this and I will do.
It really is a simple matter if You're used to expressions. I used to write bbcode invocation and addition/subtraction algorithms. It was only list that was three pass with bullet hierarchy mind You.
Gl and will look to this in time. regards, Le Attol.
It really is a simple matter if You're used to expressions. I used to write bbcode invocation and addition/subtraction algorithms. It was only list that was three pass with bullet hierarchy mind You.
Gl and will look to this in time. regards, Le Attol.
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 57 guests