[PD] The parent patch file name... state saving

Frank Barknecht fbar at footils.org
Tue Sep 6 10:49:49 CEST 2005


Thomas O Fredericks hat gesagt: // Thomas O Fredericks wrote:
> For state saving: I would like to create an abstration that saves an XML 
> file (with the help of pool and memento for example) in the same folder 
> as the parent patch. The file would have the same name except for an 
> appended ".xml". That way, once you reload the patch, it reads the xml 
> file, and voilà, your settings are restored.
> What do you think about this aproach?

My opninion about using patch names as statefile names is mentioned
sometimes in the archives: I don't like it, it's not the way, I think
about what a pd patch is. 

I consider a pd patch to be its own application, which was built using
Pd instead of, say, C++. Presets in a pd patch then are like working
files of this application. Assume you have a Pd application called
"WORD.pd" then this could use all "*.doc" files everywhere as working
files - like MS Word and Word-doc files.

However it is a bad idea to enforce the basename of the working file.
What use would WORD be, if you could only save one file and this file
would always have to be called "WORD.xml" and it would need to be in
the same directory as the WORD.exe?

Now your approach is slightly different, in that you use another file
just for restoring settings. I don't see the need for this extra file
yet, though. 

 Frank Barknecht                               _ ______footils.org__
          _ __latest track: "plak" @ http://footils.org/cms/show/44

More information about the Pd-list mailing list