Page 1 of 1
need file pathway managing in preset for wave-array
Posted: Mon Apr 07, 2014 3:15 pm
by KG_is_back
I need a module that can store (multiple) pathways of wave files as a preset parameter and be able to load these waves on preset change. Also need an option to delete wave (make filepath empty and delete wave at the same index) or replace it with a new one
Re: need file pathway managing in preset for wave-array
Posted: Mon Apr 07, 2014 3:44 pm
by CoreStylerz
You can save array of namesfiles with preset manager.
Than you use realitve paths (better than adding path to the preset) and the load at preset change the file.
I've made a module time ago, used in hardcore kicks vst.
Try searching
www.synthmakers.tkSite has some problems now I have to fix but you may find it.
Re: need file pathway managing in preset for wave-array
Posted: Mon Apr 07, 2014 4:13 pm
by KG_is_back
The thing with the relative paths is interesting. How can I force the plugin to use samples from directory where preset is saved? The user will probably don't what to have the samples in the directory of the plugin - it is a multi drum sampler, so the user probably has a directory where he saves the samples (at least all people I know do...)
Re: need file pathway managing in preset for wave-array
Posted: Mon Apr 07, 2014 4:33 pm
by CoreStylerz
I suggest to do what i've done for hardcore kicks 2.
You make a relative path in Documents\ your plugin.
There's a relative path primitive that always load the current user documents path.
If you add in the preset an array:
0 wave1.wav
1 wave2.wav
Etc etc..
Then you just have to mix relative path + array index to get your path: .... Documents\your plugin\wave1.wav..
Its more harder to explain that doing it.
At preset change your trigger to load the path structured that way.
It will works for anyone from xp to win 8.1.
And you avoid to deal with C:// programs permissions UAC.
Because from vista you need admin privileges for saving these folders.
In that way no matter where you save preset file. It will load always samples from your relative path according to name.
Only limit is that for any path the filename should be unique sensitive case.
To share among users, they just need to share preset and sample file. Sample file should be always in your plugin folder in documents..
Or you can also make an export thing. For example you can. Save the entire array (no big samples or flowstone crash... We need 64 bit or a better memory management) into a text file including the preset and make an import function that extract the array and make a wav then import preset.