2.01: preset string dosn't detect empty or space $change
Archive · 20115 old posts
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
sunsynth ·
Didn't tested it in v1.17 (Prog overwritten 😉
this buddy fuc**d me up now for 10 days:
I have an edit box with above preset string - that's sounds normal right?!
But...
If i leave it empty or even a space in it (also controlled in saved preset-file.txt of course) this damn component don't detect this as a preset change!!! 🙁
Say 'dummy' was before in my edit box then load above preset file with '' or ' ' as it's content - no change in my edit box-
it shows 'dummy' like before and no After/Preset change triggers are fired!
100% verified as a bug...
trogluddite ·
Yup, it's a bug alright.
Only occurs on loading presets from disk - that's why I didn't notice it in my Edit Box schematic.
I think this little setup may provide a workaround...
...just adds a '
Loading the posts…
#39; prefix to the string and then removes it again, so that the preset isn't blank. Not quite sure it will work if the preset is 'undefined', but it will allow an empty string to be stored.
aliasant ·
trogluddite wrote: Yup, it's a bug alright.
Only occurs on loading presets from disk - that's why I didn't notice it in my Edit Box schematic.
I think this little setup may provide a workaround...
...just adds a '
Loading the posts…
#39; prefix to the string and then removes it again, so that the preset isn't blank. Not quite sure it will work if the preset is 'undefined', but it will allow an empty string to be stored.
That Preset string has always been unreliabale. I stopped using it. Even made a weird algo so that I can convert a string into a Float Array and save it using the VST Array Parameter instead and also decode it back into a string. Works but is quite complicated.
rl ·
this now ancient solution of mine (made before the VST string module was released) still works reliable for me:
[old link]
sunsynth ·
It's unbelievable Trog - used same workaround just before u posted it (use DUMMY now as THE prefix) but $ hits it better...
@rl: That was before i joined SM but i just saw u updated it 2 years later - must have forgot that thread
Will i have to make changes in the Preset manager or is it compatible?
P.S: never noticed 'store string' and 'store strlen' ???!!!
Thanks guys!
Wrote something here? To have a post removed or your name hidden, write to [email protected].