need file pathway managing in preset for wave-array

For general discussion related FlowStone
Post Reply
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

need file pathway managing in preset for wave-array

Post 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
User avatar
CoreStylerz
Posts: 327
Joined: Sun Jan 22, 2012 2:19 am
Location: italy
Contact:

Re: need file pathway managing in preset for wave-array

Post 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.tk
Site has some problems now I have to fix but you may find it.
Need my support for app development, website or custom scripts?
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: need file pathway managing in preset for wave-array

Post 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...)
User avatar
CoreStylerz
Posts: 327
Joined: Sun Jan 22, 2012 2:19 am
Location: italy
Contact:

Re: need file pathway managing in preset for wave-array

Post 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.
Need my support for app development, website or custom scripts?
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
Post Reply