how to save dynamically sized arrays in preset?

For general discussion related FlowStone
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: how to save dynamically sized arrays in preset?

Post by Nubeat7 »

you run still into the same issue, that the presets are always loaded with the last arraysize (from the previous preset)
i also tried to save the arraysize as an extra presetparameter but this also gets setted after the presetchange is done, and there is no way schedule the preset parameter loading..
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: how to save dynamically sized arrays in preset?

Post by tulamide »

Nubeat7 wrote:you run still into the same issue, that the presets are always loaded with the last arraysize (from the previous preset)

Erm, yes. But now you don't need more than one preset. You just store everything you need in one preset. Even the programs, the last progam used, all settings, the arrays, etc. All with that exact technique.

Edit: Or do you mean, you don't know the size of this one preset? Since you know it's only one, you can read its size from the text file after load and reload it then.
"There lies the dog buried" (German saying translated literally)
Exo
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK
Contact:

Re: how to save dynamically sized arrays in preset?

Post by Exo »

There is a module by DWB which I think does what you want?

Re sizable preset array
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: how to save dynamically sized arrays in preset?

Post by Nubeat7 »

yes i think that is the best solution to have about this issue, good idea to set the maximum always when an array is bigger, like this you have always the minimum max array elements and avoid a limit for the maximum size!

thanks exo for the reference seems to be the best solution for this :)
Last edited by Nubeat7 on Sat Aug 16, 2014 6:18 pm, edited 1 time in total.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: how to save dynamically sized arrays in preset?

Post by Nubeat7 »

tulamide wrote:Erm, yes. But now you don't need more than one preset. You just store everything you need in one preset. Even the programs, the last progam used, all settings, the arrays, etc. All with that exact technique.

Edit: Or do you mean, you don't know the size of this one preset? Since you know it's only one, you can read its size from the text file after load and reload it then.

ah ok you meant it like this, but it has some disadvanteges to do it like this because i had to do all parameters in arrays then,

1. each automatable parameter would show up '@presets.times' in the daw
2. this array would be huge, if you want to save 128 presets (x 2048 for wavetables)
3. the presetmanger would only act to save the one preset, so you would need to create your own presetmanagement system ( which is not that bad becasue you need it anyway if you want to compile exe's too )

DWB's system is pretty good for that
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: how to save dynamically sized arrays in preset?

Post by Nubeat7 »

Nubeat7 wrote:.. the best solution for this :)


but there is still one issue with DWB's solution, if you also save and load whole banks the maximum size could vary there and we are back in the original situation with reloading of arrays with different sizes.. :roll:

i think there is no way around to set a fixed size which is also the maximum size..

i think the only way would be that the DSPdevs change this primitive so that it doesn't need the n connector and it always loads the array with its saved size, just don't know if this feature would be limited by the vst sdk?
User avatar
digitalwhitebyte
Posts: 106
Joined: Sat Jul 31, 2010 10:20 am

Re: how to save dynamically sized arrays in preset?

Post by digitalwhitebyte »

Hi Nubeat7,
here not have any problem when load and save, single or all preset.
Can you post an schematic with your scenario issue?
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: how to save dynamically sized arrays in preset?

Post by Nubeat7 »

digitalwhitebyte wrote:Hi Nubeat7,
here not have any problem when load and save, single or all preset.
Can you post an schematic with your scenario issue?


hmm, yes you are right, it works when all presetbanks are done with the same app, i forgot that the max size never should get resetted once you started building the presets and presetbanks, but it could happen if users xchange their own presetbanks and you get a bank with bigger arrays in some presets as you ever have done by yourself, or the vendor provides some new banks which include presets with bigger arrays then they were in the original version, am i right?

i haven't tested this, but if i understand the schematic right this scenario could result in this issue, or?
User avatar
digitalwhitebyte
Posts: 106
Joined: Sat Jul 31, 2010 10:20 am

Re: how to save dynamically sized arrays in preset?

Post by digitalwhitebyte »

No problem of backwards compatibility until your array has a lesser length of your current max value reached,
otherwise you must insert a new check for comparing the length of the loaded preset,
if it corresponds to max value until now reached, and set the new max length value to the preset array component.
I hope I explained, if I can, post here an example.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: how to save dynamically sized arrays in preset?

Post by Nubeat7 »

hmm i build in a check size and tried to load a presetlist which includes bigger arrays then the previous,

it seems to work fine with setting a new max size but the presetarray only spit out the nr of values from the previous size the rest gets truncated or better to say set to zero also when you reload the preset,

it looks like that all arrays of the presetbank are loaded with the previous max array size and bigger onces get trucated, once they are loaded they are in with the truncated arrays, so if there is a larger array then in the previous presetbank you need to load the bank iterate through all presets to find the largest array and than reload the bank again with the new max array size.
Attachments
VST_Array_Max_Length_Variable _check.osm
(9.97 KiB) Downloaded 1026 times
Post Reply