[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Parameter space - saving to disk




Hi Miguel

So you're writing the identity dictionary to disc and loading it? I don't know why that wouldn't work, but absent an expert opinion I can tell you what works for me: I keep all my presets in arrays outside ParameterSpace and write the arrays to disc. When I load from disc or change parameters I parameterDict.put the parameter values from the preset arrays. That may seem backwards, and it get's a little complicated to keep track of values with no keys this way when you have a lot of parameters, but it works. So that might suggest that your explanation is plausible. I actually wanted to clean up my code by replacing arrays with dictionaries, as it's getting a bit out of hand, but it seems there is something about identity dictionaries that needs to be investigate first.

I hope you find a solution.

Martin


Den 30/04/2009 kl. 21.45 skrev Miguel Negrao:

Hi

I'm trying to save a ParameterSpace to disk using writeArchive but I'm getting some problems. When I do readArchive then I can't access the members of parameterDict.

After doing a = Object.readArchive doing a.parameterDict I get a nice list of my points and parameters, but
a.parameterDict.at(a.points[0]) gives me nil...

Could it be related to the fact that "An IdentityDictionary is an associative collection mapping keys to values. Keys match only if they are identical objects. (i.e. === returns true.)" and maybe after reading back the ParameterSpace from file the objects in points and in the paramDict are no longer the same ?

thanks,

ps: ParaSpace from ixi quark is a great gui for ParameterSpace.
--
Miguel Negrão // ZLB
http://www.friendlyvirus.org/artists/zlb/

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/ sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/