Page 3 of 4

Re: save multiline text in preset

PostPosted: Thu Sep 14, 2017 8:26 pm
by gvalletto
adamszabo wrote:The easiest and most simplest solution is to convert your multiline string to hexadecimal then convert it back. The problem is that the string preset only holds 255 (i think) characters and you can only write a small description, but it does the job


Eureka?
I achieved to save long texts using 1 single input box, using hexadecimal conversion as Adam Szabo suggested. See this new scheme.
ThereĀ“s some bugs, if anyone want to research...

Re: save multiline text in preset

PostPosted: Fri Sep 15, 2017 7:13 pm
by gvalletto
adamszabo wrote:The easiest and most simplest solution is to convert your multiline string to hexadecimal then convert it back. The problem is that the string preset only holds 255 (i think) characters and you can only write a small description, but it does the job


Adam, can I use your idea of convert text to hexadecimal for donationware purposes?

Re: save multiline text in preset

PostPosted: Sat Sep 16, 2017 1:41 pm
by gvalletto
Hello everyone. What silence is here ...
I want to share a little discovery that meant great benefits to me.
These days, I spent many hours obsessed designing long text preset schemes. Since the primitive "Preset String" pops up that "are restricted to 255 characters", I always worked on separating texts to save them in several separate presets, such as what I published in this topic.
What I discovered Is that when you save the text in hexadecimal format, there is no restriction on length. At least I've used presets with texts longer than 1000 characters and they work fine!
Here I leave the scheme. Thank you all for your interest and for your suggestions.

Re: save multiline text in preset

PostPosted: Sat Sep 16, 2017 4:38 pm
by adamszabo
gvalletto wrote:Adam, can I use your idea of convert text to hexadecimal for donationware purposes?


Sure you can use it no problem. I have no idea how and why your latest example can save even more text but it seems to work just fine, so use it as you like!

Re: save multiline text in preset

PostPosted: Sat Sep 16, 2017 7:40 pm
by tulamide
gvalletto wrote:Hello everyone. What silence is here ...
I want to share a little discovery that meant great benefits to me.
These days, I spent many hours obsessed designing long text preset schemes. Since the primitive "Preset String" pops up that "are restricted to 255 characters", I always worked on separating texts to save them in several separate presets, such as what I published in this topic.
What I discovered Is that when you save the text in hexadecimal format, there is no restriction on length. At least I've used presets with texts longer than 1000 characters and they work fine!
Here I leave the scheme. Thank you all for your interest and for your suggestions.

I can imagine that Flowstone doesn't use a c-string internally. There are several string formats in c/c++, the developer can choose to use.
However, always remember that VST is a defined protocol. If you don't stick to the rules, you are not 100% compatible with VST. For example, what about DAWs? A lot of them save the state of your plugin when saving a project. They use the VST protocol to do so. You might lose your text when reloading a project (without saving the preset, but only relying on the DAW state saving). That is just one example. So make sure it doesn't get you into trouble. But in general I wouldn't use anything that's beyond the definition of VST.

Re: save multiline text in preset

PostPosted: Sat Sep 16, 2017 8:33 pm
by gvalletto
adamszabo wrote:
gvalletto wrote:Adam, can I use your idea of convert text to hexadecimal for donationware purposes?


Sure you can use it no problem. I have no idea how and why your latest example can save even more text but it seems to work just fine, so use it as you like!


Thanks Adam!

Re: save multiline text in preset

PostPosted: Sat Sep 16, 2017 8:36 pm
by gvalletto
tulamide wrote:I can imagine that Flowstone doesn't use a c-string internally. There are several string formats in c/c++, the developer can choose to use.
However, always remember that VST is a defined protocol. If you don't stick to the rules, you are not 100% compatible with VST. For example, what about DAWs? A lot of them save the state of your plugin when saving a project. They use the VST protocol to do so. You might lose your text when reloading a project (without saving the preset, but only relying on the DAW state saving). That is just one example. So make sure it doesn't get you into trouble. But in general I wouldn't use anything that's beyond the definition of VST.


So I must to be care when I export to VST. In the other hand, no problem when exporting exe files, due Flowstone includes its own host with it.

Re: save multiline text in preset

PostPosted: Sat Sep 16, 2017 9:08 pm
by gvalletto
I just recently exported a VSTi and tried it on Savihost. Long texts work well.

Re: save multiline text in preset

PostPosted: Sat Sep 16, 2017 9:31 pm
by tulamide
That's fine. And if you're just creating this for yourself, there'S nothing to worry about. If it works in your production environment, just use it.

But you ignore the VST specifications. Keep that in mind. Especially when sharing this with other people. Always point out that this works outside of the VST realm and might be problematic somewhere somehow. Don't share it as "a VST", since that requires to meet the specifications by 100%. If you just share an executable you don't even have to mention it. It is only when sharing a VST plugin, that you need to point it out.

Re: save multiline text in preset

PostPosted: Sun Sep 17, 2017 12:52 am
by gvalletto
Ok, thanks by your suggestions. I'll take it into account. Meantime, I will continue to researching on a "legal" way to work with large texts...