[PD] re: state saving

Frank Barknecht fbar at footils.org
Sun Nov 30 12:28:37 CET 2003


Hallo,
David NG McCallum hat gesagt: // David NG McCallum wrote:

> But as for my current situation, it uses arrays of numbers and ... er, 
> textfile, I think, to store the values. In each patch that I create 
> (that is the master patch, not the abstraction) there is some sort of 
> control subpatch. Every time an abstraction is loaded it queries the 
> master subpatch for a settings file based on the abstraction's 
> parameters. The master subpatch then looks for that file in the path of 
> the patch.
> 
> Likewise when an abstraction saves it sends its data to the master 
> subpatch, who then saves that data in a file in the patch of the parent 
> patch.

Regardless of how saving is done technically: What are your and other's
requirements in state saving in the light of abstractions?

I think, that a persistable abstraction needs to provide hooks to
change its own state, but it also needs to make its state local, so as
not to change the state of another instance of the same abstraction.

I guess this all is a typical case for the Memento design pattern.
Interestingly while looking for an URL to explain the Memento pattern
to those without the Gang of Four book, I found this page:

 http://www.agcs.com/supportv2/techpapers/patterns/papers/tutnotes/sld025.htm

where Memento is explained at saving the state of an audio mixer!!

ciao
-- 
 Frank Barknecht                               _ ______footils.org__




More information about the Pd-list mailing list