Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

String array to preset string.

For general discussion related FlowStone

String array to preset string.

Postby lalalandsynth » Sun Mar 31, 2019 8:45 pm

I am trying to save a string array into a preset but on load it always returns the string array with these "/////"
Any thoughts on this ?

preset array.jpg
preset array.jpg (187.71 KiB) Viewed 9956 times
User avatar
lalalandsynth
 
Posts: 600
Joined: Sat Oct 01, 2016 12:48 pm

Re: String array to preset string.

Postby wlangfor@uoguelph.ca » Sun Mar 31, 2019 8:47 pm

hmm, odd I've never had that happen before.
Sorry I don't have My PC available to Me ATM but if I did I'd sort it out for You, GL.
My youtube channel: DSPplug
My Websites: www.dspplug.com KVRaudio flowstone products
User avatar
wlangfor@uoguelph.ca
 
Posts: 912
Joined: Tue Apr 03, 2018 5:50 pm
Location: North Bay, Ontario, Canada

Re: String array to preset string.

Postby lalalandsynth » Sun Mar 31, 2019 9:21 pm

This is what it looks like opened in Sublime text.

So It obviously saves it like that ?
preset string.jpg
preset string.jpg (95.76 KiB) Viewed 9954 times
User avatar
lalalandsynth
 
Posts: 600
Joined: Sat Oct 01, 2016 12:48 pm

Re: String array to preset string.

Postby trogluddite » Sun Mar 31, 2019 10:54 pm

Multi-line preset strings have always been a problem, but this seems to be a rather new spin on it (I think you're using a later version of FS to me, judging by the extra inputs on your VST String primitive.)

The extra data in the file represents line endings, which in Windows are always a sequence of two characters; CTRL-R (carriage return) followed by CTRL-N (new-line). Backslash is often used as an escape character to indicate that what follows is a control character (as it is in Ruby - "Line1\r\nLine2" would be a two-line String.)

In older versions of FS, you couldn't have line breaks in a preset String at all, because each parameter was allowed only one line of the file, and any new line characters got interpreted literally as starting a new row of the table, messing up the data. It looks as if newer versions of FS have tried to get around this limitation by using escaped control characters to mark line endings - but the doubled backslashes are messing this up. The intent seems pretty clear, so I'd say that this is certainly a bug in FS.

For both the old and this new problem with multi-line VST Strings, you can work around them by joining the array elements into a single String with the "String Array to String" primitive, using a separator character of your choice (e.g. a comma), and then use the "Split String" primitive to convert back to a string array. However, note that a VST String can only contain 255 (IIRC) characters, so you need to be careful that your array isn't too large!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: String array to preset string.

Postby lalalandsynth » Sun Mar 31, 2019 11:32 pm

Excellent ! , Thanks for this Trog .
Only need to save 24 characters but 24 sets of them so 288 if i joined it into one string array .
Will report this as a bug .
User avatar
lalalandsynth
 
Posts: 600
Joined: Sat Oct 01, 2016 12:48 pm

Re: String array to preset string.

Postby lalalandsynth » Thu Apr 11, 2019 10:23 pm

Reported as a bug in the ALPHA , bug found , fixed.
User avatar
lalalandsynth
 
Posts: 600
Joined: Sat Oct 01, 2016 12:48 pm


Return to General

Who is online

Users browsing this forum: No registered users and 94 guests