Hallo, Josh Steiner hat gesagt: // Josh Steiner wrote:
incidentally i am also pretty deep in the process of building a modular sequencer that saves the state of all the objects in a song using [maphash] which suffers from the same "saves the textfile releatve to the pd dir, not the patch dir" problem. how can you share a little more detail on how your solved this issue? also, what advantages does the [pool] object have over [maphash]?
I never used maphash, so I can't be to deep about that, but some of the cool pool features are:
shared storage pool possible: just give a name as first argument, and all pool's with the same name share all data and actions. With this the state-file location in the filesystem becomes rather irrelevant, because loading just one file with the full path is no PITA anymore.
saves and loads xml data, too.
Hierarchical data structure.
Pool hierarchies in XML look like this (indentation by me):
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE pool SYSTEM "pool.dtd">
<pool> <value key="1">60</value> <value key="2">51</value> <dir key="bla"> <value key="2">66</value> <value key="1">44</value> </dir> <dir key="check"> <value key="2">69</value> <value key="1">41</value> </dir> <dir key="bass"> <value key="2">8</value> <value key="1">96</value> </dir> </dir> <dir key="1"> <value key="a_symbol">0</value> <value key="b_symbol">89</value> <dir key="subfolder"> <value key="subkey">with a list inside</value> </dir> </dir> </pool>
Maybe there's even more inside...
Frank Barknecht _ ______footils.org__