Preset string prim bug ?

Discuss suspected defects before submitting a bug report

Moderator: electrogear

Preset string prim bug ?

Postby tektoog on Wed Oct 19, 2011 11:35 am

Hey,
has someone a soution to make this working correctly?

Preset String bug.rar
(8.87 KiB) Downloaded 180 times


If you change presets, everything works well...the 2 lines in the text prim are loaded correctly;
But now if you save preset 1 and then load it on preset 2...only the first line is recalled....
I got that this is a preset STRING prim and not a preset TEXT prim.... but why is it recalling the 2 lines in the first place!
Any thoughts on that?
Ps: I emailed Malc about it.....
Essential random order for chaotic repetitive sequences
User avatar
tektoog
essemilian
 
Posts: 444
Joined: Mon Apr 07, 2008 12:21 am
Location: Alps-France

Re: Preset string prim bug ?

Postby Mo on Wed Oct 19, 2011 12:21 pm

It seems not possible to recall multiple lines. It would work with one line per preset.
User avatar
Mo
essemilian
 
Posts: 439
Joined: Thu Jan 24, 2008 2:00 pm
Location: Copenhagen

Re: Preset string prim bug ?

Postby trogluddite on Wed Oct 19, 2011 12:22 pm

I think this is to do with the preset file format - I have had a similar problem recently.
Multi-line strings naturally contain new-line characters - each new-line fools the preset manager into thinking that it has entered a new 'cell' in the preset text file (i.e. it thinks that each line is actually a new parameter).

You can get around it by replacing the new line with some other seperator character, and then substituting back when re-loading. This is pretty easy using the 'string to string array' or 'string replace' primitives.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3033
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Preset string prim bug ?

Postby tektoog on Wed Oct 19, 2011 12:43 pm

Thanks for your answers.

Mo wrote:It seems not possible to recall multiple lines. It would work with one line per preset.

Yes, but then it starts to be a lot of components for just one preset... arrays are our friends here !

trogluddite wrote:Multi-line strings naturally contain new-line characters - each new-line fools the preset manager into thinking that it has entered a new 'cell' in the preset text file (i.e. it thinks that each line is actually a new parameter).

I was thinking about the same... it seems to be that...
Mo wrote:You can get around it by replacing the new line with some other seperator character, and then substituting back when re-loading

Got 5 minutes to put it together?...my brain is kind of fried after 2 weeks of debugging nights and days to narrow down the problem to the preset string component in this complete project.... and I'm kind of lazy today...first day of real fall weather today...rain, rain, rain...and grey clouds...
But i'll get to it ... slowly...

Thanks guys! ;)
Essential random order for chaotic repetitive sequences
User avatar
tektoog
essemilian
 
Posts: 444
Joined: Mon Apr 07, 2008 12:21 am
Location: Alps-France

Re: Preset string prim bug ?

Postby tektoog on Wed Oct 19, 2011 1:49 pm

OK.... brain not that fried yet !!
and quite easy to fix finally... :D

Preset String bug - FIX.rar
(8.89 KiB) Downloaded 186 times

The key is to put everything on 1 line....
Obviously... ;)
Don't know if it works exported as a vst, cause it says the preset String prim goes until 255 characters... I'll see...
Thanks again guys !
Essential random order for chaotic repetitive sequences
User avatar
tektoog
essemilian
 
Posts: 444
Joined: Mon Apr 07, 2008 12:21 am
Location: Alps-France

Re: Preset string prim bug ?

Postby Mo on Wed Oct 19, 2011 2:31 pm

Yep,

Nice fix! Thanks.
User avatar
Mo
essemilian
 
Posts: 439
Joined: Thu Jan 24, 2008 2:00 pm
Location: Copenhagen

Re: Preset string prim bug ?

Postby trogluddite on Wed Oct 19, 2011 3:28 pm

tektoog wrote:...first day of real fall weather today...rain, rain, rain...and grey clouds..

He He, sounds like our summer this year - the hottest day of the year here in Yorkshire was Oct.1st!!
But tonight - first frost and snow of the year - and in a few days, clocks change to GMT - dark going to work and dark coming home again. Time for hibernation!! (I wish - but I can always dream!).
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3033
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Preset string prim bug ?

Postby tektoog on Thu Oct 20, 2011 10:02 pm

Sorry 4 the late reply......was sleeping already !!! ;)
Yep same crazy weather overhere at the bottom of the Mt-Blanc mountain....
July started in September this year... and since 2 days we went from summer to winter... from 26° to 2°...with a one rainy fall day transition....
Essential random order for chaotic repetitive sequences
User avatar
tektoog
essemilian
 
Posts: 444
Joined: Mon Apr 07, 2008 12:21 am
Location: Alps-France

Re: Preset string prim bug ?

Postby tektoog on Wed Mar 28, 2012 2:53 am

Updated to an extended version there
Essential random order for chaotic repetitive sequences
User avatar
tektoog
essemilian
 
Posts: 444
Joined: Mon Apr 07, 2008 12:21 am
Location: Alps-France


Return to Bugs

Who is online

Users browsing this forum: No registered users and 4 guests

cron