aboutsummaryrefslogtreecommitdiff
path: root/memento
diff options
context:
space:
mode:
authorFrank Barknecht <fbar@users.sourceforge.net>2004-04-23 16:22:42 +0000
committerFrank Barknecht <fbar@users.sourceforge.net>2004-04-23 16:22:42 +0000
commit35994ca3a4ef6a136a16cac63b4f68540d0434e1 (patch)
treee7eb586c20c9f678abed90c474529e2a21c6e8a8 /memento
This commit was generated by cvs2svn to compensate for changes in r1630,svn2git-root
which included commits to RCS files with non-trunk default branches. svn path=/trunk/abstractions/rradical/; revision=1631
Diffstat (limited to 'memento')
-rw-r--r--memento/README.txt148
-rw-r--r--memento/careGUI.pd55
-rw-r--r--memento/caretaker.pd41
-rw-r--r--memento/commun.pd18
-rw-r--r--memento/examples/bla.dat1
-rw-r--r--memento/examples/bla.xml21
-rw-r--r--memento/examples/list.dat24
-rw-r--r--memento/examples/listsymbol.pd39
-rw-r--r--memento/examples/mainpatch.pd35
-rw-r--r--memento/examples/memento-unittest.pd48
-rw-r--r--memento/examples/memget.pd7
-rw-r--r--memento/examples/numbers.pd62
-rw-r--r--memento/examples/rradical.pd46
-rw-r--r--memento/examples/settings.dat6
-rw-r--r--memento/examples/tester.pd32
-rw-r--r--memento/netcontrol.pd33
-rw-r--r--memento/originator.pd246
-rw-r--r--memento/rradical.state.pd223
-rw-r--r--memento/tutorial/0-START.pd30
-rw-r--r--memento/tutorial/0-tut.pd17
-rw-r--r--memento/tutorial/1-tut.pd22
-rw-r--r--memento/tutorial/10-tut.pd41
-rw-r--r--memento/tutorial/11-tut.pd25
-rw-r--r--memento/tutorial/12-tut.pd61
-rw-r--r--memento/tutorial/2-tut.pd22
-rw-r--r--memento/tutorial/3-tut.pd30
-rw-r--r--memento/tutorial/4-tut.pd41
-rw-r--r--memento/tutorial/5-tut.pd51
-rw-r--r--memento/tutorial/6-tut.pd39
-rw-r--r--memento/tutorial/7-tut.pd16
-rw-r--r--memento/tutorial/8-tut.pd13
-rw-r--r--memento/tutorial/9-tut.pd20
-rw-r--r--memento/tutorial/MoreStates.dat22
-rw-r--r--memento/tutorial/OSCAbstraction.pd32
-rw-r--r--memento/tutorial/TheStateName.dat6
-rw-r--r--memento/tutorial/anAbstraction.pd29
-rw-r--r--memento/tutorial/miniab.pd18
-rw-r--r--memento/tutorial/neu.dat22
-rw-r--r--memento/tutorial/savedState.dat6
-rw-r--r--memento/tutorial/tutorial.pd15
40 files changed, 1663 insertions, 0 deletions
diff --git a/memento/README.txt b/memento/README.txt
new file mode 100644
index 0000000..7fa3dfa
--- /dev/null
+++ b/memento/README.txt
@@ -0,0 +1,148 @@
+_ Memento _
+
+ver. 0.4
+
+This is a work-in-progress collection of a unified preset system for Pd
+patches. It tries to loosely follow the Memento [1] design pattern from the Gang of
+Four book.
+
+I propose that a Memento here is realised as a directory in a data pool inside
+a [pool] object. Currently the pool is hardcoded to be named "RRADICAL". This
+could change, but maybe it doesn't need to. Inside the Memento, several
+numbered subfolders are created to store the actual substates.
+
+The Memento is only changed or read through the [originator] abstraction.
+[originator] has two arguments:
+
+1) the name of a Memento
+2) $0
+
+Methods of [originator]:
+
+ * create Memento-name: creates a new Memento, discards the old.
+ * set anything: sets all variables to the values currently in the pool. For use
+ after loading a file with the [caretaker]
+ * substate management
+ * right inlet: OSC messages
+ * some more. Look inside.
+
+It is not allowed to bypass [originator] to change the values inside the
+RRADICAL pool, with one exception:
+
+The [caretaker] abstraction is responsible for saving and loading pool data from
+harddisk. [caretaker] takes a filename to save and load as argument. A GUI for
+it is provided in [careGUI].
+
+Methods of [caretaker]:
+
+ * file filename: set's filename to save/load.
+ * save poolname: saves the contents of the pool named "poolname". For rradical
+ patches this currently has to be "RRADICAL"
+ * load poolname: loads the contents, same as save, but the other way around.
+
+Communication between [originator] and anything that wants to save anything is
+done through the [commun] abstraction.
+
+[commun] arguments:
+
+1) the name of a variable ("key")
+2) $0
+
+[commun] accepts anything and spits out anything if [originator] tells it too
+(with [originator]'s "set" message).
+
+Both $0 arguments above are mandatory to keep Memento reusable, which is the
+first goal all in RRADical patches.
+
+_ Usage _
+
+Every abstraction, that wants to take part in saving its settings with Memento
+needs to:
+1) include an [originator /Memento $0] objects
+2) cross-wrap all variables with [commun /id $0] objects. Because of a bug,
+ for wrapping symbols a [symbol] objects has to be added after [commun]'s
+ outlet.
+3) The slash is there to allow routing of OSC-messages for remote control.
+
+A single [caretaker] or [careGUI] in the parent patch then can save and reload
+settings in the pool to disk.
+
+Please follow the tutorial to learn more about Memento-usage.
+
+_ ChangeLog _
+
+0.4
+* Wrote a tutorial, yeah.
+* Now uses Cyclone's set-able prepend for setting state.
+* originator got a OSC-inlet.
+* requires a "pool" with the mkchdir messages (available in CVS since Dec 17 2003)
+* some cleanup
+
+0.3
+* OSC remote control. Useage example is in netcontrol.pd
+* copy/paste with messages copy and past to originator.
+
+0.2
+* Use numbered subfolders as states
+* More examples, careGUI.pd
+
+0.1
+* Initial release
+
+_ Bugs _
+
+* Plenty.
+* [prepend] strips off type identifiers like "symbol", so you currently have to
+ take care of types yourself. Only lists and floats work out of the box
+ currently.
+* The "API" is is bound to change.
+* spelling errors
+
+_ Footnotes _
+
+[1] Here's a description of the Memento pattern by Kamal Patel from
+http://www.kamalpatel.net/Articles/MementoPattern.htm
+
+A look at a Design Pattern - Memento:
+
+A Design Pattern can be thought of as an architectural layout to solve a
+problem whose actual implementation could be in millions of ways. The approach
+used to solve this problem is by a Design Pattern called Memento. The intent of
+a Memento is to capture and externalize an object's internal state so
+that the object can be restored to this state later.
+
+Every Design pattern has a motivation. The Motivation behind the Memento
+Pattern arose from the need to store the objects current state and then be able
+ to restore it when requested. Let us look at an example where a Memento Pattern
+could be used. Consider that we want to implement Undo features into our
+application. We will need to keep a track of changes as the user works by
+capturing each state via a Memento object and then when the user requests an
+Undo, we will request the Memento to reset to an the last stored state. We
+would achieve this by the two general interfaces exposed by the Memento;
+GetState() and SetState().
+
+A memento pattern is constructed by three objects:
+
+Memento
+Stores internal state of the Originator object.
+Protects against access by objects other than the originator. Mementos
+effectively have two interfaces (methods).
+
+Originator
+Creates a Memento containing a snapshot of its current internal state
+Uses the Memento to restore its internal state
+
+CareTaker
+Is responsible for the Memento's safekeeping
+Never operates on or examines the state of the Memento
+
+Generally a memento is responsible for storing a snapshot of the internal state
+of another object. In our case the Memento was responsible for storing the
+state of a grid and restoring the state of the grid upon request. Mementos are
+usually dynamic in nature but we used the same concept to store persistent
+state of the grids into a VFP table. This is because it was faster an easier to
+maintain.
+
+Remember that Design Patterns provide us with a guidance to solve a problem for
+the most commonly occurring software problems. We use this as a basis for our
+design and then enhance or extend the design depending on our requirements.
diff --git a/memento/careGUI.pd b/memento/careGUI.pd
new file mode 100644
index 0000000..377231c
--- /dev/null
+++ b/memento/careGUI.pd
@@ -0,0 +1,55 @@
+#N canvas 241 224 305 88 10;
+#X obj 2 15 cnv 15 300 60 empty empty empty 20 12 0 14 -233017 -66577
+0;
+#X obj 35 30 bng 40 250 50 0 empty empty SAVE 0 -6 0 8 -24198 -1 -1
+;
+#X obj 121 31 bng 40 250 50 0 empty empty RESTORE 0 -6 0 8 -258699
+-1 -1;
+#X obj 19 1 inlet;
+#X obj 203 30 bng 40 250 50 0 empty empty FILE 0 -6 0 8 -262131 -1
+-1;
+#N canvas 497 329 693 405 guts 0;
+#X obj 68 51 inlet;
+#X obj 227 43 inlet;
+#X obj 353 58 inlet;
+#X msg 77 85 save RRADICAL;
+#X msg 210 121 load RRADICAL;
+#X text 207 100 load/save file into/from pool by name;
+#X obj 196 147 t b a;
+#X text 11 131 set filename;
+#X obj 170 209 caretaker \$1;
+#X obj 105 237 outlet;
+#X text 116 255 bang after restore;
+#X obj 472 54 inlet;
+#X msg 349 172 file \$1;
+#X obj 351 139 savepanel;
+#X msg 350 242 savex bla.xml;
+#X connect 0 0 3 0;
+#X connect 1 0 4 0;
+#X connect 2 0 13 0;
+#X connect 3 0 8 0;
+#X connect 4 0 6 0;
+#X connect 6 0 9 0;
+#X connect 6 1 8 0;
+#X connect 11 0 8 0;
+#X connect 12 0 8 0;
+#X connect 13 0 12 0;
+#X connect 14 0 8 0;
+#X restore 78 0 pd guts;
+#X obj 169 0 outlet;
+#X obj 263 47 bng 15 250 50 0 empty empty reset 0 -6 0 8 -250685 -1
+-1;
+#X msg 260 67 reset;
+#X obj 90 43 bng 15 250 50 0 empty empty print 0 -6 0 8 -261689 -1
+-1;
+#X msg 81 60 print;
+#X connect 1 0 5 0;
+#X connect 2 0 5 1;
+#X connect 3 0 5 3;
+#X connect 4 0 5 2;
+#X connect 5 0 6 0;
+#X connect 7 0 8 0;
+#X connect 8 0 5 3;
+#X connect 9 0 10 0;
+#X connect 10 0 5 3;
+#X coords 0 0 1 1 304 75 1;
diff --git a/memento/caretaker.pd b/memento/caretaker.pd
new file mode 100644
index 0000000..5571dd1
--- /dev/null
+++ b/memento/caretaker.pd
@@ -0,0 +1,41 @@
+#N canvas 0 0 450 300 10;
+#X obj 198 219 pool;
+#X obj 123 147 symbol \$1;
+#X msg 199 119 pool \$1;
+#X obj 153 89 t b s;
+#X msg 130 169 save \$1;
+#X obj 282 149 symbol \$1;
+#X msg 319 180 load \$1;
+#X msg 337 120 pool \$1;
+#X obj 150 10 inlet;
+#X obj 282 90 t b s;
+#X obj 93 67 symbol;
+#X obj 174 59 symbol;
+#X obj 259 68 symbol;
+#X msg 405 276 reset;
+#X text 257 276 DANGER! HIGH VOLTAGE!;
+#X msg 73 241 savex bla.xml;
+#X msg 326 74 printroot;
+#X obj 148 33 route file save load print;
+#X connect 1 0 4 0;
+#X connect 2 0 0 0;
+#X connect 3 0 1 0;
+#X connect 3 1 2 0;
+#X connect 4 0 0 0;
+#X connect 5 0 6 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 17 0;
+#X connect 9 0 5 0;
+#X connect 9 1 7 0;
+#X connect 10 0 1 1;
+#X connect 10 0 5 1;
+#X connect 11 0 3 0;
+#X connect 12 0 9 0;
+#X connect 13 0 0 0;
+#X connect 15 0 0 0;
+#X connect 16 0 0 0;
+#X connect 17 0 10 0;
+#X connect 17 1 11 0;
+#X connect 17 2 12 0;
+#X connect 17 3 16 0;
diff --git a/memento/commun.pd b/memento/commun.pd
new file mode 100644
index 0000000..f8ca528
--- /dev/null
+++ b/memento/commun.pd
@@ -0,0 +1,18 @@
+#N canvas 329 264 450 300 10;
+#X obj 162 41 inlet;
+#X obj 161 240 outlet;
+#X obj 162 72 prepend \$1;
+#X obj 161 158 r \$2-in;
+#X obj 161 208 route \$1;
+#X obj 69 207 OSCroute \$1;
+#X text 22 262 Read \$2-OSC (== \$0-OSC) \, filter by argument \$1
+;
+#X obj 162 99 s \$2-RRADICAL-MEMENTO;
+#X text 95 123 RRADICAL_MEMENTO is also in originator;
+#X obj 69 183 r \$2-RRADICAL-OSC;
+#X connect 0 0 2 0;
+#X connect 2 0 7 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 9 0 5 0;
diff --git a/memento/examples/bla.dat b/memento/examples/bla.dat
new file mode 100644
index 0000000..b3b9114
--- /dev/null
+++ b/memento/examples/bla.dat
@@ -0,0 +1 @@
+temp 0 , list1 , 100 50 100 74
diff --git a/memento/examples/bla.xml b/memento/examples/bla.xml
new file mode 100644
index 0000000..bfccb9f
--- /dev/null
+++ b/memento/examples/bla.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE pool SYSTEM "pool.dtd">
+<pool>
+<dir key="temp">
+<dir key="0">
+<value key="list1">105 183 62 67</value>
+</dir>
+</dir>
+<dir key="0">
+<value key="list1">0 0 0 0</value>
+</dir>
+<dir key="">
+<dir key="0">
+<value key="list1">0 0 0 0</value>
+</dir>
+</dir>
+<dir key="mydir">
+<dir key="0">
+</dir>
+</dir>
+</pool>
diff --git a/memento/examples/list.dat b/memento/examples/list.dat
new file mode 100644
index 0000000..7eb6b0b
--- /dev/null
+++ b/memento/examples/list.dat
@@ -0,0 +1,24 @@
+temp1 4 , list1 , 100 100 100 100
+temp1 5 , list1 , -100 100 100 100
+temp1 6 , list1 , -100 100 100 -100
+temp1 7 , list1 , -100 100 -100 -100
+temp1 0 , list1 , 100 0 0 0
+temp1 2 , list1 , 0 100 100 0
+temp1 3 , list1 , 0 100 100 100
+temp1 1 , list1 , 0 100 0 0
+temp 4 , list1 , 0 1 0 1
+temp 4 , name , five
+temp 5 , list1 , 0 1 1 0
+temp 5 , name , six
+temp 6 , list1 , 0 1 1 1
+temp 6 , name , seven
+temp 7 , list1 , 1 0 0 0
+temp 7 , name , eight
+temp 0 , list1 , 0 0 0 1
+temp 0 , name , one
+temp 2 , list1 , 0 0 1 1
+temp 2 , name , three
+temp 3 , list1 , 0 1 0 0
+temp 3 , name , four
+temp 1 , list1 , 0 0 1 0
+temp 1 , name , two
diff --git a/memento/examples/listsymbol.pd b/memento/examples/listsymbol.pd
new file mode 100644
index 0000000..3acc013
--- /dev/null
+++ b/memento/examples/listsymbol.pd
@@ -0,0 +1,39 @@
+#N canvas 239 79 855 654 10;
+#X obj 243 432 s restore;
+#X msg 243 398 symbol restore;
+#X obj 270 85 r restore;
+#X obj 243 300 careGUI list.dat;
+#X obj 270 111 numbers temp;
+#X obj 537 87 r restore;
+#X obj 543 517 pool;
+#X obj 540 550 print value;
+#X symbolatom 462 436 10 0 0 0 - - -;
+#X symbolatom 569 588 10 0 0 0 - - -;
+#X msg 542 480 set name \$1;
+#X msg 634 480 get name;
+#X msg 633 446 save /tmp/names.dat;
+#X obj 458 509 print set;
+#X obj 537 111 numbers temp1;
+#X msg 587 309 printall;
+#X msg 587 361 printrec;
+#X text 587 341 print values in dir and subdirs;
+#X text 657 360 (depth may be given);
+#X msg 587 410 printroot;
+#X text 587 390 print values in dir and subdirs (starting from root)
+;
+#X msg 680 520 load list.dat;
+#X connect 1 0 0 0;
+#X connect 2 0 4 0;
+#X connect 3 0 1 0;
+#X connect 5 0 14 0;
+#X connect 6 0 7 0;
+#X connect 6 0 9 0;
+#X connect 8 0 10 0;
+#X connect 10 0 6 0;
+#X connect 10 0 13 0;
+#X connect 11 0 6 0;
+#X connect 12 0 6 0;
+#X connect 15 0 6 0;
+#X connect 16 0 6 0;
+#X connect 19 0 6 0;
+#X connect 21 0 6 0;
diff --git a/memento/examples/mainpatch.pd b/memento/examples/mainpatch.pd
new file mode 100644
index 0000000..0f7a873
--- /dev/null
+++ b/memento/examples/mainpatch.pd
@@ -0,0 +1,35 @@
+#N canvas 200 96 855 654 10;
+#X floatatom 229 20 5 0 0 0 - - -;
+#X obj 229 42 t b f;
+#X obj 89 105 rradical foo;
+#X obj 174 618 s restore;
+#X obj 415 31 r restore;
+#X obj 415 56 spigot;
+#X obj 468 53 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 89 30 r restore;
+#X obj 89 55 spigot;
+#X msg 259 71 substate \$1;
+#X floatatom 665 25 5 0 0 0 - - -;
+#X obj 665 47 t b f;
+#X msg 695 76 substate \$1;
+#X msg 89 76 restore;
+#X msg 415 77 restore;
+#X obj 174 535 careGUI bla.dat;
+#X obj 415 105 rradical bar;
+#X connect 0 0 1 0;
+#X connect 1 0 13 0;
+#X connect 1 1 9 0;
+#X connect 4 0 5 0;
+#X connect 5 0 14 0;
+#X connect 6 0 5 1;
+#X connect 7 0 8 0;
+#X connect 8 0 13 0;
+#X connect 9 0 2 0;
+#X connect 10 0 11 0;
+#X connect 11 0 14 0;
+#X connect 11 1 12 0;
+#X connect 12 0 16 0;
+#X connect 13 0 2 0;
+#X connect 14 0 16 0;
+#X connect 15 0 3 0;
diff --git a/memento/examples/memento-unittest.pd b/memento/examples/memento-unittest.pd
new file mode 100644
index 0000000..6b40615
--- /dev/null
+++ b/memento/examples/memento-unittest.pd
@@ -0,0 +1,48 @@
+#N canvas 283 408 540 387 10;
+#X obj 74 259 careGUI;
+#X obj 333 97 originator test 10;
+#X floatatom 117 60 5 0 0 0 - - -;
+#X symbolatom 156 86 10 0 0 0 - - -;
+#X obj 107 85 symbol;
+#X msg 333 66 set;
+#X msg 378 70 substate \$1;
+#X obj 343 20 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 343 46 t b f;
+#X obj 151 118 unpack 0 0 0;
+#X floatatom 152 142 5 0 0 0 - - -;
+#X floatatom 198 142 5 0 0 0 - - -;
+#X floatatom 246 143 5 0 0 0 - - -;
+#X obj 152 184 pack 0 0 0;
+#X obj 142 17 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1
+-1 3;
+#X obj 20 17 commun /radio 10;
+#X obj 224 162 t b f;
+#X obj 174 162 t b f;
+#X obj 18 60 commun /a 10;
+#X obj 19 85 commun /b 10;
+#X obj 20 141 commun /lister 10;
+#X connect 2 0 18 0;
+#X connect 3 0 19 0;
+#X connect 4 0 3 0;
+#X connect 5 0 1 0;
+#X connect 6 0 1 0;
+#X connect 7 0 8 0;
+#X connect 8 0 5 0;
+#X connect 8 1 6 0;
+#X connect 9 0 10 0;
+#X connect 9 1 11 0;
+#X connect 9 2 12 0;
+#X connect 10 0 13 0;
+#X connect 11 0 17 0;
+#X connect 12 0 16 0;
+#X connect 13 0 20 0;
+#X connect 14 0 15 0;
+#X connect 15 0 14 0;
+#X connect 16 0 13 0;
+#X connect 16 1 13 2;
+#X connect 17 0 13 0;
+#X connect 17 1 13 1;
+#X connect 18 0 2 0;
+#X connect 19 0 4 0;
+#X connect 20 0 9 0;
diff --git a/memento/examples/memget.pd b/memento/examples/memget.pd
new file mode 100644
index 0000000..a33552d
--- /dev/null
+++ b/memento/examples/memget.pd
@@ -0,0 +1,7 @@
+#N canvas 0 0 450 300 10;
+#X obj 146 149 pool RRADICAL;
+#X obj 146 72 inlet;
+#X obj 146 184 outlet;
+#X obj 146 109 prepend get;
+#X connect 0 0 2 0;
+#X connect 1 0 3 0;
diff --git a/memento/examples/numbers.pd b/memento/examples/numbers.pd
new file mode 100644
index 0000000..3bf6f0f
--- /dev/null
+++ b/memento/examples/numbers.pd
@@ -0,0 +1,62 @@
+#N canvas 319 311 450 300 10;
+#X floatatom 26 113 5 0 0 0 - - -;
+#X floatatom 337 111 5 0 0 0 - - -;
+#X obj 158 177 pack 0 0 0 0;
+#X obj 252 149 t b f;
+#X floatatom 242 112 5 0 0 0 - - -;
+#X obj 212 148 t b f;
+#X floatatom 142 113 5 0 0 0 - - -;
+#X obj 169 146 t b f;
+#X obj 207 82 unpack 0 0 0 0;
+#X obj 129 51 bng 15 250 50 0 empty empty set 0 -6 0 8 -262144 -1 -1
+;
+#X msg 41 174 set memento;
+#X obj 49 41 inlet;
+#X obj 48 73 select restore;
+#X msg 163 265 substate \$1;
+#X obj 102 229 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1
+-1 0;
+#X obj 134 244 t b a;
+#X symbolatom 250 182 10 0 0 0 - - -;
+#X obj 330 181 commun name \$0;
+#X obj 142 206 commun list1 \$0;
+#X obj 39 266 originator \$1 \$0;
+#X obj 332 208 symbol;
+#X obj 232 53 bng 15 250 50 0 empty empty copy 0 -6 0 8 -262144 -1
+-1;
+#X obj 352 54 bng 15 250 50 0 empty empty paste 0 -6 0 8 -262144 -1
+-1;
+#X msg 272 61 copy;
+#X msg 393 71 paste;
+#X connect 0 0 2 0;
+#X connect 1 0 3 0;
+#X connect 2 0 18 0;
+#X connect 3 0 2 0;
+#X connect 3 1 2 3;
+#X connect 4 0 5 0;
+#X connect 5 0 2 0;
+#X connect 5 1 2 2;
+#X connect 6 0 7 0;
+#X connect 7 0 2 0;
+#X connect 7 1 2 1;
+#X connect 8 0 0 0;
+#X connect 8 1 6 0;
+#X connect 8 2 4 0;
+#X connect 8 3 1 0;
+#X connect 9 0 10 0;
+#X connect 10 0 19 0;
+#X connect 11 0 12 0;
+#X connect 12 0 9 0;
+#X connect 13 0 19 0;
+#X connect 14 0 15 0;
+#X connect 15 0 9 0;
+#X connect 15 1 13 0;
+#X connect 16 0 17 0;
+#X connect 17 0 20 0;
+#X connect 18 0 8 0;
+#X connect 20 0 16 0;
+#X connect 21 0 23 0;
+#X connect 22 0 24 0;
+#X connect 23 0 19 0;
+#X connect 24 0 19 0;
+#X coords 0 0 1 1 200 140 1;
diff --git a/memento/examples/rradical.pd b/memento/examples/rradical.pd
new file mode 100644
index 0000000..115be3d
--- /dev/null
+++ b/memento/examples/rradical.pd
@@ -0,0 +1,46 @@
+#N canvas 314 76 305 428 10;
+#X obj 3 16 cnv 15 300 400 empty empty empty 20 12 0 14 -233017 -66577
+0;
+#X msg 67 354 set memento;
+#X obj 89 180 hsl 128 15 0 127 0 0 empty empty n1 -2 -6 0 8 -262144
+-1 -1 2400 1;
+#X obj 67 316 bng 32 250 50 0 empty empty restore 0 -6 0 8 -258699
+-1 -1;
+#X obj 31 210 inlet;
+#X msg 132 74 create \$1;
+#X symbolatom 132 51 20 0 0 0 Memento_Name - -;
+#X obj 132 101 s \$0-orig;
+#X obj 67 375 s \$0-orig;
+#X obj 86 152 commun n1 \$0;
+#X obj 89 228 hsl 128 15 0 127 0 0 empty empty n2 -2 -6 0 8 -262144
+-1 -1 8300 1;
+#X obj 86 203 commun n2 \$0;
+#X obj 132 25 symbol \$1;
+#X obj 37 23 loadbang;
+#X obj 173 345 r \$0-orig;
+#X floatatom 132 124 5 0 0 0 substate - -;
+#X obj 173 373 originator \$1 \$0;
+#X obj 67 285 select restore;
+#X obj 31 258 route memento substate;
+#X obj 203 284 symbol;
+#X msg 193 125 substate \$1;
+#X connect 1 0 8 0;
+#X connect 2 0 9 0;
+#X connect 3 0 1 0;
+#X connect 4 0 18 0;
+#X connect 5 0 7 0;
+#X connect 6 0 5 0;
+#X connect 9 0 2 0;
+#X connect 10 0 11 0;
+#X connect 11 0 10 0;
+#X connect 12 0 6 0;
+#X connect 13 0 12 0;
+#X connect 14 0 16 0;
+#X connect 15 0 20 0;
+#X connect 17 0 3 0;
+#X connect 18 0 12 0;
+#X connect 18 1 15 0;
+#X connect 18 2 19 0;
+#X connect 19 0 17 0;
+#X connect 20 0 7 0;
+#X coords 0 0 1 1 304 422 1;
diff --git a/memento/examples/settings.dat b/memento/examples/settings.dat
new file mode 100644
index 0000000..b34c749
--- /dev/null
+++ b/memento/examples/settings.dat
@@ -0,0 +1,6 @@
+/erster 0 , /warm , 44.8235
+/erster 0 , /wave , 3
+/erster-adsr 0 , /r , 301.587
+/erster-adsr 0 , /s , 0.396825
+/erster-adsr 0 , /a , 33.3333
+/erster-adsr 0 , /d , 98.4127
diff --git a/memento/examples/tester.pd b/memento/examples/tester.pd
new file mode 100644
index 0000000..f3bdbbf
--- /dev/null
+++ b/memento/examples/tester.pd
@@ -0,0 +1,32 @@
+#N canvas 314 76 305 428 10;
+#X obj 1 21 cnv 15 300 400 empty empty empty 20 12 0 14 -233017 -66577
+0;
+#X msg 216 69 set memento;
+#X obj 35 77 hsl 128 15 0 127 0 0 empty empty n1 -2 -6 0 8 -262144
+-1 -1 0 1;
+#X obj 216 31 bng 32 250 50 0 empty empty restore 0 -6 0 8 -258699
+-1 -1;
+#X obj 216 3 inlet;
+#X msg 130 229 create \$1;
+#X symbolatom 131 206 20 0 0 0 create_Memento - -;
+#X obj 131 256 s \$0-orig;
+#X obj 216 90 s \$0-orig;
+#N canvas 0 0 450 300 guts 0;
+#X obj 121 157 originator \$1 \$0;
+#X obj 122 100 r \$0-orig;
+#X connect 1 0 0 0;
+#X restore 188 359 pd guts;
+#X obj 32 49 commun n1 \$0;
+#X obj 34 140 hsl 128 15 0 127 0 0 empty empty n2 -2 -6 0 8 -262144
+-1 -1 0 1;
+#X obj 31 115 commun n2 \$0;
+#X connect 1 0 8 0;
+#X connect 2 0 10 0;
+#X connect 3 0 1 0;
+#X connect 4 0 3 0;
+#X connect 5 0 7 0;
+#X connect 6 0 5 0;
+#X connect 10 0 2 0;
+#X connect 11 0 12 0;
+#X connect 12 0 11 0;
+#X coords 0 0 1 1 200 140 1;
diff --git a/memento/netcontrol.pd b/memento/netcontrol.pd
new file mode 100644
index 0000000..8a45d74
--- /dev/null
+++ b/memento/netcontrol.pd
@@ -0,0 +1,33 @@
+#N canvas 363 400 167 71 10;
+#X symbolatom 12 39 10 0 0 2 whereTo? - -;
+#X obj 65 180 pack s 0;
+#X floatatom 105 39 5 0 0 2 what? - -;
+#X msg 65 204 send \$1 \$2;
+#X obj 129 80 t b f;
+#X obj 65 230 outlet;
+#X obj 67 104 makesymbol \$1/%s;
+#X obj 260 64 loadbang;
+#X obj 264 132 route float;
+#X msg 264 157 bang;
+#X obj 260 90 any \$2;
+#X obj 301 189 symbol unknown;
+#X obj 13 7 inlet;
+#X obj 105 6 inlet;
+#X obj 54 149 symbol;
+#X connect 0 0 6 0;
+#X connect 1 0 3 0;
+#X connect 2 0 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 14 0;
+#X connect 4 1 1 1;
+#X connect 6 0 14 1;
+#X connect 7 0 10 0;
+#X connect 8 0 9 0;
+#X connect 8 1 11 0;
+#X connect 9 0 11 0;
+#X connect 10 0 8 0;
+#X connect 11 0 0 0;
+#X connect 12 0 0 0;
+#X connect 13 0 2 0;
+#X connect 14 0 1 0;
+#X coords 0 0 1 1 200 50 1;
diff --git a/memento/originator.pd b/memento/originator.pd
new file mode 100644
index 0000000..71afcd0
--- /dev/null
+++ b/memento/originator.pd
@@ -0,0 +1,246 @@
+#N canvas 260 166 978 591 10;
+#X text 425 22 responsibilities:;
+#X text 98 10 ORIGINATOR (the mixing engineer);
+#X text 447 59 * set memento (restore settings from photo);
+#X text 448 40 * create memento (take photo);
+#N canvas 76 23 720 450 createMemento 0;
+#X obj 48 84 inlet;
+#X obj 97 117 symbol \$1;
+#X obj 97 90 loadbang;
+#X obj 97 150 s \$0-memento;
+#X text 75 49 \$1 is the default name of the memento \, that this originator
+creates \, but it can be changed later.;
+#X obj 74 179 outlet;
+#X text 292 108 What is a memento?;
+#X text 275 121 a memento is a directory in a global (data)pool;
+#X obj 305 139 r \$0-memento;
+#X msg 309 180 state \$1;
+#X obj 319 213 s \$0-pool;
+#X connect 0 0 1 0;
+#X connect 1 0 3 0;
+#X connect 1 0 5 0;
+#X connect 2 0 1 0;
+#X connect 8 0 9 0;
+#X connect 9 0 10 0;
+#X restore 122 321 pd createMemento;
+#X obj 122 104 inlet;
+#N canvas 600 185 664 406 setMemento 0;
+#X text 238 12 setMemento is responsible for restoring all registered
+variables.;
+#X obj 64 26 inlet;
+#X obj 109 286 outlet;
+#X obj 109 249 r \$0-restore;
+#X msg 64 126 getall;
+#X obj 64 183 s \$0-pool;
+#N canvas 468 415 450 300 change2substate 0;
+#X obj 92 39 inlet;
+#X obj 113 198 outlet;
+#X obj 185 93 r \$0-memento;
+#X obj 280 93 r \$0-substate;
+#X obj 113 144 pack s s 0;
+#X obj 92 93 symbol chdir;
+#X obj 92 67 t b;
+#X obj 113 167 route list;
+#X text 218 163 un-list again;
+#X connect 0 0 6 0;
+#X connect 2 0 4 1;
+#X connect 3 0 4 2;
+#X connect 4 0 7 0;
+#X connect 5 0 4 0;
+#X connect 6 0 5 0;
+#X connect 7 0 1 0;
+#X restore 131 127 pd change2substate;
+#X text 186 104 change to dir memento substate;
+#X obj 64 52 t b b b;
+#X obj 130 75 s \$0-set-ON;
+#X connect 1 0 8 0;
+#X connect 3 0 2 0;
+#X connect 4 0 5 0;
+#X connect 6 0 5 0;
+#X connect 8 0 4 0;
+#X connect 8 1 6 0;
+#X connect 8 2 9 0;
+#X restore 256 446 pd setMemento;
+#X text 431 90 What is a memento?;
+#X text 463 111 a memento is a directory in a global (data)pool;
+#X text 432 135 What is a state?;
+#X obj 563 328 r \$0-pool;
+#X symbolatom 691 374 10 0 0 3 memento - -;
+#X msg 170 103 create help;
+#X msg 261 103 set memento;
+#X obj 777 348 inlet;
+#X obj 535 300 prepend set;
+#X obj 178 297 s \$0-substate;
+#X obj 787 463 r \$0-substate;
+#X msg 787 492 substate \$1;
+#X msg 99 471 copy;
+#X msg 210 472 paste;
+#X obj 134 514 s \$0-pool;
+#X obj 309 341 symbol;
+#X obj 156 440 t b b;
+#X msg 620 389 set \$1;
+#X obj 563 460 s \$2-in;
+#X obj 197 418 r \$0-set;
+#X obj 148 472 s \$0-set;
+#X obj 787 521 s \$0-pool;
+#X obj 225 274 s \$0-pool;
+#X text 462 154 a state is the content of a memento subdirectory named
+by a number.;
+#X text 819 348 OSC inlet;
+#X obj 777 377 OSCroute \$1;
+#X text 462 154 a state is the content of a memento subdirectory named
+by a number.;
+#X obj 535 273 r \$2-RRADICAL-MEMENTO;
+#X text 443 248 \$2-RRADICAL-MEMENTO is sent by commun objects;
+#X obj 777 413 s \$2-RRADICAL-OSC;
+#X obj 563 419 prepend RRADICAL.dummy;
+#X obj 385 520 outlet;
+#X obj 235 196 prepend get;
+#N canvas 468 415 450 300 ch2subs 0;
+#X obj 92 39 inlet;
+#X obj 113 198 outlet;
+#X obj 185 93 r \$0-memento;
+#X obj 280 93 r \$0-substate;
+#X obj 113 144 pack s s 0;
+#X obj 92 67 t b;
+#X obj 113 167 route list;
+#X text 218 163 un-list again;
+#X obj 92 94 symbol chdir;
+#X connect 0 0 5 0;
+#X connect 2 0 4 1;
+#X connect 3 0 4 2;
+#X connect 4 0 6 0;
+#X connect 5 0 8 0;
+#X connect 6 0 1 0;
+#X connect 8 0 4 0;
+#X restore 255 252 pd ch2subs;
+#X obj 225 230 t a b;
+#X obj 563 382 spigot;
+#X obj 448 520 spigot;
+#N canvas 548 386 450 300 tgl 0;
+#X obj 155 198 outlet;
+#X obj 240 198 outlet;
+#X msg 151 120 0;
+#X msg 184 120 1;
+#X msg 233 120 0;
+#X msg 266 120 1;
+#X obj 295 55 r \$0-set-ON;
+#X obj 292 85 loadbang;
+#X obj 185 65 r \$0-get-ON;
+#X text 20 7 This tgl is to prevent some loops when using get and set.
+;
+#X connect 2 0 0 0;
+#X connect 3 0 0 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 2 0;
+#X connect 6 0 5 0;
+#X connect 7 0 5 0;
+#X connect 7 0 2 0;
+#X connect 8 0 3 0;
+#X connect 8 0 4 0;
+#X restore 486 348 pd tgl;
+#X obj 235 177 t a b;
+#X obj 287 175 s \$0-get-ON;
+#X msg 505 463 set \$1;
+#X obj 448 493 prepend RRADICAL.dummy;
+#X obj 385 493 spigot;
+#X obj 448 544 outlet;
+#X text 353 541 Value outlet;
+#X text 494 545 Value/Key outlet;
+#X obj 370 228 s \$0-substate;
+#X obj 340 203 t b f;
+#X obj 563 351 rradical.state \$1;
+#X obj 22 197 route ldxdir svxdir;
+#X msg 23 285 ldxdir \$1;
+#X msg 102 289 svxdir \$1;
+#X obj 23 316 s \$0-pool;
+#X obj 646 494 outlet;
+#X text 641 515 OSC outlet;
+#X obj 637 461 OSCprepend \$1;
+#X msg 720 487 setsub \$1;
+#X obj 764 437 OSCroute /preset;
+#X obj 720 547 s \$0-setsub;
+#X obj 173 77 r \$0-setsub;
+#X obj 161 378 select copy paste set;
+#X obj 122 132 route create substate get setsub;
+#X obj 340 251 s \$0-set;
+#X obj 25 261 symbol;
+#X obj 101 267 symbol;
+#X obj 12 220 t b a;
+#X msg 12 360 set;
+#X text 12 382 after loadx \, set;
+#X obj 12 77 r SET_ALL_RRADICALS;
+#X text 14 47 global send to do something crazy with!;
+#X obj 818 245 r \$0-substate;
+#X text 795 218 \$2 == \$0 parent;
+#X msg 818 270 set \$1;
+#X obj 818 298 s \$2-parentstate;
+#X connect 5 0 68 0;
+#X connect 10 0 55 0;
+#X connect 11 0 62 1;
+#X connect 12 0 68 0;
+#X connect 13 0 68 0;
+#X connect 14 0 32 0;
+#X connect 15 0 55 0;
+#X connect 17 0 18 0;
+#X connect 18 0 28 0;
+#X connect 19 0 21 0;
+#X connect 20 0 21 0;
+#X connect 22 0 67 0;
+#X connect 23 0 27 0;
+#X connect 23 1 20 0;
+#X connect 24 0 37 0;
+#X connect 26 0 6 0;
+#X connect 32 0 36 0;
+#X connect 32 0 64 0;
+#X connect 34 0 15 0;
+#X connect 34 0 62 0;
+#X connect 37 0 25 0;
+#X connect 39 0 41 0;
+#X connect 40 0 29 0;
+#X connect 41 0 29 0;
+#X connect 41 1 40 0;
+#X connect 42 0 37 0;
+#X connect 43 0 50 0;
+#X connect 44 0 43 1;
+#X connect 44 0 49 1;
+#X connect 44 1 42 1;
+#X connect 45 0 39 0;
+#X connect 45 1 46 0;
+#X connect 47 0 48 0;
+#X connect 48 0 43 0;
+#X connect 49 0 38 0;
+#X connect 54 0 69 0;
+#X connect 54 1 53 0;
+#X connect 55 0 42 0;
+#X connect 55 0 48 0;
+#X connect 55 0 49 0;
+#X connect 55 1 24 0;
+#X connect 55 1 47 0;
+#X connect 55 2 11 0;
+#X connect 56 0 72 0;
+#X connect 56 1 71 0;
+#X connect 57 0 59 0;
+#X connect 58 0 59 0;
+#X connect 62 0 60 0;
+#X connect 63 0 65 0;
+#X connect 64 0 63 0;
+#X connect 66 0 68 0;
+#X connect 67 0 19 0;
+#X connect 67 1 23 0;
+#X connect 67 2 6 0;
+#X connect 68 0 4 0;
+#X connect 68 1 16 0;
+#X connect 68 2 45 0;
+#X connect 68 3 54 0;
+#X connect 68 4 22 0;
+#X connect 68 4 56 0;
+#X connect 70 0 57 0;
+#X connect 71 0 58 0;
+#X connect 72 0 73 0;
+#X connect 72 1 70 0;
+#X connect 73 0 22 0;
+#X connect 75 0 68 0;
+#X connect 77 0 79 0;
+#X connect 79 0 80 0;
diff --git a/memento/rradical.state.pd b/memento/rradical.state.pd
new file mode 100644
index 0000000..eca72b1
--- /dev/null
+++ b/memento/rradical.state.pd
@@ -0,0 +1,223 @@
+#N canvas 52 147 1104 611 10;
+#X obj 103 176 outlet;
+#X obj 24 161 outlet;
+#X obj 182 161 print attr;
+#X obj 93 104 pool RRADICAL;
+#X obj 345 56 inlet;
+#X obj 48 55 r \$0-pool;
+#X obj 519 383 s \$0-pool;
+#X obj 345 141 symbol \$1;
+#X obj 274 39 loadbang;
+#X msg 400 287 getdir;
+#X obj 168 240 outlet;
+#X obj 597 323 prepend get;
+#X msg 456 172 getall;
+#X obj 526 239 s \$0-substate;
+#X obj 510 213 t b f;
+#X msg 127 42 echodir \$1;
+#X obj 127 15 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
+;
+#X msg 124 71 getdir;
+#X msg 277 89 bang;
+#X msg 633 200 copyall;
+#X msg 712 202 paste;
+#X obj 651 230 s \$0-pool;
+#X obj 637 146 symbol;
+#N canvas 468 415 450 300 mkchange2substate 0;
+#X obj 92 39 inlet;
+#X obj 111 224 outlet;
+#X obj 198 93 r \$0-memento;
+#X obj 293 93 r \$0-substate;
+#X obj 111 150 pack s s 0;
+#X obj 92 93 symbol mkchdir;
+#X obj 92 67 t b;
+#X obj 111 180 route list;
+#X text 204 180 Un-List it again;
+#X connect 0 0 6 0;
+#X connect 2 0 4 1;
+#X connect 3 0 4 2;
+#X connect 4 0 7 0;
+#X connect 5 0 4 0;
+#X connect 6 0 5 0;
+#X connect 7 0 1 0;
+#X restore 510 284 pd mkchange2substate;
+#X obj 345 177 t b b s;
+#X obj 415 201 s \$0-memento;
+#X obj 555 168 prepend set;
+#X obj 6 111 print pool;
+#X obj 345 94 route state getstate getall substate set get;
+#X obj 637 168 select copy paste;
+#X obj 846 517 s \$0-pool;
+#X obj 54 344 print svld;
+#X obj 773 301 route ldxdir svxdir;
+#X msg 656 444 ldxdir \$1;
+#X msg 839 414 svxdir \$1;
+#X obj 660 422 symbol;
+#X obj 839 390 symbol;
+#X obj 188 372 print currentDir;
+#X msg 197 73 printroot;
+#N canvas 468 415 450 300 mkchange2tmp 0;
+#X obj 92 39 inlet;
+#X obj 111 224 outlet;
+#X obj 198 93 r \$0-memento;
+#X obj 92 93 symbol mkchdir;
+#X obj 92 67 t b;
+#X obj 111 180 route list;
+#X text 204 180 Un-List it again;
+#X msg 296 94 symbol tmp;
+#X obj 111 150 pack s s s;
+#X obj 296 66 loadbang;
+#X msg 167 37 bang;
+#X connect 0 0 4 0;
+#X connect 2 0 8 1;
+#X connect 3 0 8 0;
+#X connect 4 0 3 0;
+#X connect 5 0 1 0;
+#X connect 7 0 8 2;
+#X connect 8 0 5 0;
+#X connect 9 0 7 0;
+#X connect 10 0 4 0;
+#X restore 726 429 pd mkchange2tmp;
+#N canvas 468 415 450 300 mkchange2substate 0;
+#X obj 92 39 inlet;
+#X obj 111 224 outlet;
+#X obj 198 93 r \$0-memento;
+#X obj 293 93 r \$0-substate;
+#X obj 111 150 pack s s 0;
+#X obj 92 93 symbol mkchdir;
+#X obj 111 180 route list;
+#X text 204 180 Un-List it again;
+#X text 195 29 change back to substate dir;
+#X obj 92 67 t b b;
+#X msg 38 98 clrclip;
+#X connect 0 0 9 0;
+#X connect 2 0 4 1;
+#X connect 3 0 4 2;
+#X connect 4 0 6 0;
+#X connect 5 0 4 0;
+#X connect 6 0 1 0;
+#X connect 9 0 10 0;
+#X connect 9 1 5 0;
+#X connect 10 0 1 0;
+#X restore 806 362 pd mkchange2substate;
+#X obj 698 345 t b a b;
+#N canvas 405 362 611 326 tmp2sub 0;
+#X obj 121 12 inlet;
+#X obj 111 224 outlet;
+#X obj 198 93 r \$0-memento;
+#X obj 293 93 r \$0-substate;
+#X obj 111 150 pack s s 0;
+#X obj 92 93 symbol mkchdir;
+#X obj 111 180 route list;
+#X text 204 180 Un-List it again;
+#X msg 36 91 paste;
+#X obj 121 40 t b b b;
+#X text 191 19 copies data from "tmp" dir \, changes to current substate
+\, pastes data.;
+#X msg 406 90 copyall;
+#X connect 0 0 9 0;
+#X connect 2 0 4 1;
+#X connect 3 0 4 2;
+#X connect 4 0 6 0;
+#X connect 5 0 4 0;
+#X connect 6 0 1 0;
+#X connect 8 0 1 0;
+#X connect 9 0 8 0;
+#X connect 9 1 5 0;
+#X connect 9 2 11 0;
+#X connect 11 0 1 0;
+#X restore 574 443 pd tmp2sub;
+#N canvas 405 362 611 326 sub2tmp 0;
+#X obj 121 12 inlet;
+#X obj 111 224 outlet;
+#X obj 198 93 r \$0-memento;
+#X obj 92 93 symbol mkchdir;
+#X obj 111 180 route list;
+#X text 204 180 Un-List it again;
+#X msg 36 91 paste;
+#X obj 121 40 t b b b;
+#X msg 406 90 copyall;
+#X text 189 8 copies data from current dir \, changes to "tmp" dir
+\, pastes data.;
+#X obj 293 93 symbol tmp;
+#X msg 294 47 bang;
+#X obj 359 47 loadbang;
+#X obj 111 150 pack s s s;
+#X connect 0 0 7 0;
+#X connect 2 0 13 1;
+#X connect 3 0 13 0;
+#X connect 4 0 1 0;
+#X connect 6 0 1 0;
+#X connect 7 0 6 0;
+#X connect 7 1 3 0;
+#X connect 7 2 8 0;
+#X connect 8 0 1 0;
+#X connect 10 0 13 2;
+#X connect 11 0 10 0;
+#X connect 12 0 10 0;
+#X connect 13 0 4 0;
+#X restore 909 416 pd sub2tmp;
+#X obj 851 328 t b a b;
+#X msg 710 394 bang;
+#X obj 204 273 print currentCommand;
+#X obj 706 526 print ldx;
+#X obj 941 502 print svx;
+#X connect 3 0 1 0;
+#X connect 3 1 0 0;
+#X connect 3 2 10 0;
+#X connect 3 4 2 0;
+#X connect 4 0 28 0;
+#X connect 5 0 3 0;
+#X connect 7 0 24 0;
+#X connect 8 0 7 0;
+#X connect 9 0 6 0;
+#X connect 11 0 6 0;
+#X connect 12 0 6 0;
+#X connect 14 0 23 0;
+#X connect 14 1 13 0;
+#X connect 15 0 3 0;
+#X connect 16 0 15 0;
+#X connect 17 0 3 0;
+#X connect 18 0 7 0;
+#X connect 19 0 21 0;
+#X connect 20 0 21 0;
+#X connect 22 0 29 0;
+#X connect 23 0 6 0;
+#X connect 24 0 9 0;
+#X connect 24 1 23 0;
+#X connect 24 2 25 0;
+#X connect 26 0 6 0;
+#X connect 28 0 7 0;
+#X connect 28 1 9 0;
+#X connect 28 2 12 0;
+#X connect 28 3 14 0;
+#X connect 28 4 26 0;
+#X connect 28 5 11 0;
+#X connect 28 6 22 0;
+#X connect 28 6 32 0;
+#X connect 29 0 19 0;
+#X connect 29 1 20 0;
+#X connect 32 0 41 0;
+#X connect 32 1 44 0;
+#X connect 33 0 30 0;
+#X connect 33 0 47 0;
+#X connect 34 0 30 0;
+#X connect 34 0 48 0;
+#X connect 35 0 33 0;
+#X connect 36 0 34 0;
+#X connect 38 0 3 0;
+#X connect 39 0 30 0;
+#X connect 39 0 47 0;
+#X connect 40 0 30 0;
+#X connect 40 0 48 0;
+#X connect 41 0 42 0;
+#X connect 41 1 35 0;
+#X connect 41 2 39 0;
+#X connect 42 0 30 0;
+#X connect 42 0 47 0;
+#X connect 43 0 30 0;
+#X connect 43 0 48 0;
+#X connect 44 0 40 0;
+#X connect 44 1 36 0;
+#X connect 44 2 43 0;
+#X connect 45 0 35 0;
diff --git a/memento/tutorial/0-START.pd b/memento/tutorial/0-START.pd
new file mode 100644
index 0000000..c992182
--- /dev/null
+++ b/memento/tutorial/0-START.pd
@@ -0,0 +1,30 @@
+#N canvas 440 304 450 300 10;
+#X obj 124 153 hradio 15 0 0 13 part empty Goto_part 0 -6 128 8 -262144
+-1 -1 0;
+#X obj 9 7 cnv 15 100 20 empty empty Using_Memento 20 12 1 14 -262144
+-66577 0;
+#N canvas 0 0 504 355 nav 0;
+#X obj 82 38 r part;
+#X msg 99 83 \; pd open \$1-tut.pd .;
+#X obj 65 120 - 1;
+#X obj 68 168 del 10;
+#X obj 66 143 t b f;
+#X obj 71 190 f;
+#X obj 68 248 makefilename pd-%s;
+#X msg 67 219 symbol \$1-tut.pd;
+#X msg 68 280 \; pd \$1 menu_close \;;
+#X connect 0 0 1 0;
+#X connect 0 0 2 0;
+#X connect 2 0 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 3 0;
+#X connect 4 1 5 1;
+#X connect 5 0 7 0;
+#X connect 6 0 8 0;
+#X connect 7 0 6 0;
+#X restore 317 15 pd nav;
+#X text 19 65 This is a tutorial explaing the Memento preset system.
+To use it \, make sure \, the directory containing the memento patches
+is in you pd-path \, then navigate through the tutorial parts with
+the following radio button:;
+#X floatatom 158 192 5 0 0 0 currently_viewing part -;
diff --git a/memento/tutorial/0-tut.pd b/memento/tutorial/0-tut.pd
new file mode 100644
index 0000000..53c010d
--- /dev/null
+++ b/memento/tutorial/0-tut.pd
@@ -0,0 +1,17 @@
+#N canvas 489 406 539 307 10;
+#X obj 9 7 cnv 15 100 20 empty empty Overview 20 12 1 14 -262144 -66577
+0;
+#X text 44 168 The caretaker exists only once \, the originator exists
+for every abstraction \, that needs to save something \, and commun
+objects exists for every bit of a save.;
+#X text 46 221 Let's look at the caretaker first.;
+#X obj 349 32 s part;
+#X msg 349 8 1;
+#X text 377 7 click here \, to go on;
+#X text 44 83 Memento is divided in various parts \, where each part
+has a well defined responsibility. A single caretaker is responsible
+for saving and loading state to rsp. from disk \, [originator]s wrap
+all access to change or read out the state. The originator uses commun
+objects to communicate with the things \, that represent the state.
+;
+#X connect 4 0 3 0;
diff --git a/memento/tutorial/1-tut.pd b/memento/tutorial/1-tut.pd
new file mode 100644
index 0000000..e92f68a
--- /dev/null
+++ b/memento/tutorial/1-tut.pd
@@ -0,0 +1,22 @@
+#N canvas 328 363 557 382 10;
+#X obj 9 7 cnv 15 100 20 empty empty The_Caretaker 20 12 1 14 -262144
+-66577 0;
+#X obj 378 34 s part;
+#X msg 378 10 2;
+#X text 406 8 click here \, to go on;
+#X text 44 83 The most comfortable way to use the caretaker object
+is the careGUI GUI patch:;
+#X obj 46 122 careGUI;
+#X text 43 208 It *needs* to know a filename \, before it's functional.
+You either can provide this as an argument \, or click on FILE to select
+a state file.;
+#X obj 434 284 bng 15 250 50 0 empty empty print 0 -6 0 8 -261689 -1
+-1;
+#X text 41 305 Restore also sends a;
+#X msg 191 305 bang;
+#X text 230 306 to the careGUI outlet.;
+#X text 39 332 You can use the bang \, to do housekeeping after a state
+has been loaded from disk.;
+#X text 38 257 Save and Restore do as they say: They move the memory
+data to and from disk. To see the menory data \, you can press;
+#X connect 2 0 1 0;
diff --git a/memento/tutorial/10-tut.pd b/memento/tutorial/10-tut.pd
new file mode 100644
index 0000000..5461ad6
--- /dev/null
+++ b/memento/tutorial/10-tut.pd
@@ -0,0 +1,41 @@
+#N canvas 347 241 611 495 10;
+#X obj 9 7 cnv 15 100 20 empty empty Using_OSC 20 12 1 14 -262144 -66577
+0;
+#X obj 378 34 s part;
+#X text 406 8 click here \, to go on;
+#X obj 59 298 OSCAbstraction /OSCState;
+#X msg 378 10 11;
+#X obj 59 249 pack s s;
+#X obj 249 245 pack s 0;
+#X obj 418 244 pack s 0;
+#X symbolatom 59 167 10 0 0 0 - - -;
+#X obj 59 189 t b s;
+#X obj 59 215 symbol /OSCState/aSymbol;
+#X floatatom 249 167 5 0 0 0 - - -;
+#X obj 418 171 hradio 15 1 0 8 empty empty aRadio 0 -6 0 8 -262144
+-1 -1 3;
+#X obj 418 218 symbol /OSCState/aRadio;
+#X obj 249 217 symbol /OSCState/aFloat;
+#X obj 249 191 t b f;
+#X obj 418 194 t b f;
+#X text 55 76 Here's an example \, how you could create the needed
+OSC-messages by hand: OSC-Selectors are like a filesystem path \, where
+/ is the directory divider. First comes the name of the state \, after
+that the thing to set and as second part of the list you give the value
+to set.;
+#X connect 4 0 1 0;
+#X connect 5 0 3 0;
+#X connect 6 0 3 0;
+#X connect 7 0 3 0;
+#X connect 8 0 9 0;
+#X connect 9 0 10 0;
+#X connect 9 1 5 1;
+#X connect 10 0 5 0;
+#X connect 11 0 15 0;
+#X connect 12 0 16 0;
+#X connect 13 0 7 0;
+#X connect 14 0 6 0;
+#X connect 15 0 14 0;
+#X connect 15 1 6 1;
+#X connect 16 0 13 0;
+#X connect 16 1 7 1;
diff --git a/memento/tutorial/11-tut.pd b/memento/tutorial/11-tut.pd
new file mode 100644
index 0000000..e1ebbf4
--- /dev/null
+++ b/memento/tutorial/11-tut.pd
@@ -0,0 +1,25 @@
+#N canvas 452 267 611 495 10;
+#X obj 9 7 cnv 15 100 20 empty empty Networking_with_OSC 20 12 1 14
+-262144 -66577 0;
+#X obj 378 34 s part;
+#X text 406 8 click here \, to go on;
+#X obj 76 340 OSCAbstraction /OSCState;
+#X obj 126 291 sendOSC;
+#X obj 76 316 dumpOSC 3000;
+#X msg 282 274 connect localhost 3000;
+#X obj 282 252 loadbang;
+#X obj 76 187 netcontrol /OSCState aFloat;
+#X obj 281 187 netcontrol /OSCState aRadio;
+#X text 65 77 Memento comes with an example remote control GUI called
+netcontrol. You give it the name of a receiver and then you can send
+floats to that receiver. Doing the same for other data types like symbols
+is left as an exercise to the reader. You supply the target state as
+first argument \, the receiver as second arg (without / in the example)
+;
+#X msg 378 10 12;
+#X connect 5 0 3 0;
+#X connect 6 0 4 0;
+#X connect 7 0 6 0;
+#X connect 8 0 4 0;
+#X connect 9 0 4 0;
+#X connect 11 0 1 0;
diff --git a/memento/tutorial/12-tut.pd b/memento/tutorial/12-tut.pd
new file mode 100644
index 0000000..69ebb7e
--- /dev/null
+++ b/memento/tutorial/12-tut.pd
@@ -0,0 +1,61 @@
+#N canvas 339 60 576 798 10;
+#X obj 9 7 cnv 15 100 20 empty empty Summary_and_Conclusion 20 12 1
+14 -262144 -66577 0;
+#X text 36 95 a) Things to do inside abstractions;
+#X obj 71 240 originator \$1 \$0;
+#X obj 125 183 commun /myFloat \$0;
+#X floatatom 215 157 5 0 0 0 - - -;
+#X obj 73 367 originator \$1 \$0;
+#X obj 73 317 t b f;
+#X msg 73 342 set;
+#X msg 103 343 substate \$1;
+#X floatatom 73 299 5 0 0 1 presets - -;
+#X obj 234 300 inlet OSC;
+#X text 45 397 b) Things to do in the parent patch;
+#X text 72 419 1 create a single careGUI:;
+#X obj 73 443 careGUI;
+#X obj 74 582 miniab /one;
+#X text 70 639 3 Use the OSC-inlet for remote control as you like.
+;
+#X text 151 717 Now have fun and: Please share your patches.;
+#X text 39 37 Now you've seen in detail \, how to add a preset mechanism
+and remote control with OSC to a patch using Memento. I'd like to end
+this tutorial with a summary of what to do to memento-ize your work:
+;
+#X text 72 534 2 use your abstractions with unique identifiers as arguments
+\, starting with a slash for OSC:;
+#X text 66 124 1 X-wrap (cross-wrap) all things \, that you want to
+save \, with 'commun' objects. Use names starting with slashes for
+OSC:;
+#X text 69 220 2 create a single [originator \$1 \$0] object per abstraction
+;
+#X text 71 278 3 Create a substate selector and OSC-inlet (optional):
+;
+#N canvas 0 0 450 300 OSC 0;
+#X obj 114 56 loadbang;
+#X obj 114 124 sendOSC;
+#X msg 114 86 connect localhost 3001;
+#X obj 62 62 inlet;
+#X msg 228 107 disconnect;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X connect 3 0 1 0;
+#X connect 4 0 1 0;
+#X restore 75 715 pd OSC;
+#X obj 377 564 dumpOSC 3001;
+#X obj 227 581 miniab /two;
+#X obj 75 660 netcontrol /* myFloat;
+#X text 150 736 (c) Frank Barknecht <fbar@footils.org> \, free to use
+as you like.;
+#X text 286 671 (See the /*? OSC knows wildcards!);
+#X connect 3 0 4 0;
+#X connect 4 0 3 0;
+#X connect 6 0 7 0;
+#X connect 6 1 8 0;
+#X connect 7 0 5 0;
+#X connect 8 0 5 0;
+#X connect 9 0 6 0;
+#X connect 10 0 5 1;
+#X connect 23 0 14 0;
+#X connect 23 0 24 0;
+#X connect 25 0 22 0;
diff --git a/memento/tutorial/2-tut.pd b/memento/tutorial/2-tut.pd
new file mode 100644
index 0000000..fe56d09
--- /dev/null
+++ b/memento/tutorial/2-tut.pd
@@ -0,0 +1,22 @@
+#N canvas 322 395 557 382 10;
+#X obj 9 7 cnv 15 100 20 empty empty The_Originator 20 12 1 14 -262144
+-66577 0;
+#X obj 378 34 s part;
+#X text 406 8 click here \, to go on;
+#X msg 378 10 3;
+#X text 41 68 The originator object wraps access to the data stored
+in memory. The object takes two creating argument: a symbol and a float.
+;
+#X obj 141 128 originator TheState 10;
+#X text 45 160 The first \, symbolic argument will be the name of the
+state \, that is managed. The second \, float argument is used for
+communication with the commun objects. Normally it should be unique
+to a patch \, because then you get only local communcation inside a
+patch's borders. To make it unique use \$0:;
+#X obj 139 256 originator AnotherState \$0;
+#X text 48 282 If you intend to use your patch several times \, it's
+possible to use \$1 as argument to originator \, so that the surrounding
+patch will specify the state name. So in the end \, you'll probably
+always use this:;
+#X obj 139 353 originator \$1 \$0;
+#X connect 3 0 1 0;
diff --git a/memento/tutorial/3-tut.pd b/memento/tutorial/3-tut.pd
new file mode 100644
index 0000000..083708a
--- /dev/null
+++ b/memento/tutorial/3-tut.pd
@@ -0,0 +1,30 @@
+#N canvas 322 395 781 403 10;
+#X obj 10 7 cnv 15 100 20 empty empty Originator_Methods 20 12 1 14
+-262144 -66577 0;
+#X obj 378 34 s part;
+#X text 406 8 click here \, to go on;
+#X obj 30 301 originator aState \$0;
+#X msg 77 179 set;
+#X msg 74 214 copy;
+#X msg 72 233 paste;
+#X msg 74 270 create AnotherState;
+#X msg 77 132 substate \$1;
+#X obj 77 110 hradio 15 0 0 8 empty empty empty 0 -6 0 8 -262144 -1
+-1 0;
+#X text 219 108 Select a substate. Substates are subdirectories \,
+that contain a set of state variables.;
+#X text 217 173 Set the managed objects to the values of the substate
+currently selected. Objects are managed with 'commun'. See later;
+#X text 215 218 Copy and paste a complete substate.;
+#X text 219 266 Create a totally new state. Overwrites the object argument.
+Instead of a state called 'aState' now everything is inside a state
+'AnotherState'.;
+#X text 42 64 Originator accepts various methods:;
+#X msg 378 10 4;
+#X connect 4 0 3 0;
+#X connect 5 0 3 0;
+#X connect 6 0 3 0;
+#X connect 7 0 3 0;
+#X connect 8 0 3 0;
+#X connect 9 0 8 0;
+#X connect 15 0 1 0;
diff --git a/memento/tutorial/4-tut.pd b/memento/tutorial/4-tut.pd
new file mode 100644
index 0000000..66bb69d
--- /dev/null
+++ b/memento/tutorial/4-tut.pd
@@ -0,0 +1,41 @@
+#N canvas 318 284 611 495 10;
+#X obj 9 7 cnv 15 100 20 empty empty Commun 20 12 1 14 -262144 -66577
+0;
+#X obj 378 34 s part;
+#X text 406 8 click here \, to go on;
+#X msg 378 10 5;
+#X obj 156 192 commun number 10;
+#X text 63 82 'commun' objects are responsible for communication between
+the 'originator' and the things you want to set. They also accept a
+symbolic argument as first and a float as second argument. The symbolic
+argument is used to uniquely identify the 'thing' that is managed.
+The second \, float arg serves the communication with the 'originator'.
+Normally you use \$0 here.;
+#X text 60 214 X-lets;
+#X floatatom 272 296 5 0 0 0 - - -;
+#X obj 139 321 commun aRadio \$0;
+#X obj 139 296 commun aFloat \$0;
+#X obj 271 322 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1
+-1 0;
+#X text 73 346 Of course you also can use send/receives for this \,
+to keep things more readable:;
+#X obj 92 430 s \$0-something-in;
+#X obj 92 385 r \$0-something-out;
+#X obj 92 406 commun aThing 10;
+#X obj 263 432 s \$0-something-out;
+#X obj 263 387 r \$0-something-in;
+#X obj 266 410 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
+-1 -1 0 1;
+#X text 69 230 The inlet of commun reads \, what should be saved \,
+continuosly. The outlet sets the managed 'thing' to the value \, that
+is currently stored in the 'originator' state. So you normally 'cross-wrap'
+things like this:;
+#X connect 3 0 1 0;
+#X connect 7 0 9 0;
+#X connect 8 0 10 0;
+#X connect 9 0 7 0;
+#X connect 10 0 8 0;
+#X connect 13 0 14 0;
+#X connect 14 0 12 0;
+#X connect 16 0 17 0;
+#X connect 17 0 15 0;
diff --git a/memento/tutorial/5-tut.pd b/memento/tutorial/5-tut.pd
new file mode 100644
index 0000000..c8061d3
--- /dev/null
+++ b/memento/tutorial/5-tut.pd
@@ -0,0 +1,51 @@
+#N canvas 318 284 611 495 10;
+#X obj 9 7 cnv 15 100 20 empty empty Commun_and_Originator 20 12 1
+14 -262144 -66577 0;
+#X obj 378 34 s part;
+#X text 406 8 click here \, to go on;
+#X floatatom 166 253 5 0 0 0 - - -;
+#X obj 98 334 commun aRadio \$0;
+#X obj 97 282 commun aFloat \$0;
+#X obj 167 310 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1
+-1 4;
+#X obj 87 421 s \$0-something-in;
+#X obj 87 376 r \$0-something-out;
+#X obj 223 422 s \$0-something-out;
+#X obj 223 375 r \$0-something-in;
+#X obj 226 400 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
+-1 -1 3900 1;
+#X msg 378 10 6;
+#X obj 87 397 commun aThing \$0;
+#X obj 152 202 originator myState \$0;
+#X msg 152 177 set;
+#X msg 189 177 substate \$1;
+#X obj 159 126 tgl 24 0 empty empty Toggles_Between_2_Substates 0 -6
+0 10 -225280 -1 -1 0 1;
+#X obj 159 153 t b f;
+#X text 67 451 Now play with these settings and try to switch between
+substates as well.;
+#X text 66 224 And lets manage some things with commun objects. Note
+the \$0.;
+#X symbolatom 359 267 10 0 0 2 type_something_here - -;
+#X obj 323 289 commun aSymbol \$0;
+#X obj 323 313 symbol;
+#X text 284 334 Symbols need another 'symbol' object!;
+#X text 51 77 Now lets see \, how originator and commun work together.
+First create the originator and add some messages to it:;
+#X connect 3 0 5 0;
+#X connect 4 0 6 0;
+#X connect 5 0 3 0;
+#X connect 6 0 4 0;
+#X connect 8 0 13 0;
+#X connect 10 0 11 0;
+#X connect 11 0 9 0;
+#X connect 12 0 1 0;
+#X connect 13 0 7 0;
+#X connect 15 0 14 0;
+#X connect 16 0 14 0;
+#X connect 17 0 18 0;
+#X connect 18 0 15 0;
+#X connect 18 1 16 0;
+#X connect 21 0 22 0;
+#X connect 22 0 23 0;
+#X connect 23 0 21 0;
diff --git a/memento/tutorial/6-tut.pd b/memento/tutorial/6-tut.pd
new file mode 100644
index 0000000..de5eb56
--- /dev/null
+++ b/memento/tutorial/6-tut.pd
@@ -0,0 +1,39 @@
+#N canvas 318 284 611 495 10;
+#X obj 9 7 cnv 15 100 20 empty empty Saving_And_Loading 20 12 1 14
+-262144 -66577 0;
+#X obj 378 34 s part;
+#X text 406 8 click here \, to go on;
+#X floatatom 166 253 5 0 0 0 - - -;
+#X obj 98 334 commun aRadio \$0;
+#X obj 97 282 commun aFloat \$0;
+#X obj 167 310 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1
+-1 7;
+#X msg 96 201 set;
+#X msg 133 201 substate \$1;
+#X obj 103 150 tgl 24 0 empty empty Toggles_Between_2_Substates 0 -6
+0 10 -225280 -1 -1 1 1;
+#X obj 103 177 t b f;
+#X symbolatom 359 267 10 0 0 2 type_something_here - -;
+#X obj 323 289 commun aSymbol \$0;
+#X obj 323 313 symbol;
+#X text 284 334 Symbols need another 'symbol' object!;
+#X msg 378 10 7;
+#X text 51 77 Now only a single change: We added a caretaker with careGUI.
+Please select a file then play with saving and restoring. You also
+can peek into the state with PRINT.;
+#X obj 98 377 careGUI;
+#X obj 96 226 originator myState-2 \$0;
+#X text 117 461 First select a FILE \, then SAVE!!!;
+#X connect 3 0 5 0;
+#X connect 4 0 6 0;
+#X connect 5 0 3 0;
+#X connect 6 0 4 0;
+#X connect 7 0 18 0;
+#X connect 8 0 18 0;
+#X connect 9 0 10 0;
+#X connect 10 0 7 0;
+#X connect 10 1 8 0;
+#X connect 11 0 12 0;
+#X connect 12 0 13 0;
+#X connect 13 0 11 0;
+#X connect 15 0 1 0;
diff --git a/memento/tutorial/7-tut.pd b/memento/tutorial/7-tut.pd
new file mode 100644
index 0000000..3ad77f1
--- /dev/null
+++ b/memento/tutorial/7-tut.pd
@@ -0,0 +1,16 @@
+#N canvas 393 272 611 495 10;
+#X obj 9 7 cnv 15 100 20 empty empty Abstractions 20 12 1 14 -262144
+-66577 0;
+#X obj 378 34 s part;
+#X text 406 8 click here \, to go on;
+#X msg 378 10 8;
+#X obj 59 187 anAbstraction TheStateName;
+#X obj 98 377 careGUI TheStateName.dat;
+#X text 57 78 Here's comes the cool part. All you've learned so far
+also works with abstractions. Abstractions are pd-files \, that are
+saved standalone and then called in another patch by name. Here we
+gave our abstraction an argument \, that gets routed to the 'originator'
+as name of the state. Play with it \, and don't forget to first select
+a caretaker-file.;
+#X text 100 461 First select a FILE \, then SAVE or RESTORE!!!;
+#X connect 3 0 1 0;
diff --git a/memento/tutorial/8-tut.pd b/memento/tutorial/8-tut.pd
new file mode 100644
index 0000000..ecb1155
--- /dev/null
+++ b/memento/tutorial/8-tut.pd
@@ -0,0 +1,13 @@
+#N canvas 393 272 611 495 10;
+#X obj 9 7 cnv 15 100 20 empty empty Multiple_Abstractions 20 12 1
+14 -262144 -66577 0;
+#X obj 378 34 s part;
+#X text 406 8 click here \, to go on;
+#X text 100 461 First select a FILE \, then SAVE or RESTORE!!!;
+#X obj 53 91 anAbstraction oneState;
+#X obj 54 233 anAbstraction anotherState;
+#X msg 378 10 9;
+#X obj 98 377 careGUI MoreStates.dat;
+#X text 52 56 By using different arguments \, you can even reuse an
+abstraction several times \, each with its own state.;
+#X connect 6 0 1 0;
diff --git a/memento/tutorial/9-tut.pd b/memento/tutorial/9-tut.pd
new file mode 100644
index 0000000..290e703
--- /dev/null
+++ b/memento/tutorial/9-tut.pd
@@ -0,0 +1,20 @@
+#N canvas 393 272 611 495 10;
+#X obj 9 7 cnv 15 100 20 empty empty Remote_Control_with_OSC 20 12
+1 14 -262144 -66577 0;
+#X obj 378 34 s part;
+#X text 406 8 click here \, to go on;
+#X text 98 476 First select a FILE \, then SAVE or RESTORE!!!;
+#X obj 96 392 careGUI MoreStates.dat;
+#X obj 47 163 OSCAbstraction /OSCState;
+#X text 45 62 THere even is a remote control built into Memento. It
+is done using Open Sound Control OSC. OSC requires \, that send- and
+receive-names start with a slash '/'. So now our state name (the argument
+of OSCAbstration) has a slash \, and if you look inside \, you'll see
+\, that all commun objects now also start with a slash.;
+#X msg 378 10 10;
+#X text 44 314 Also the abstraction now has gotten an inlet which accepts
+OSC-messages. This needs to be connected to the originator's right
+inlet \, its 'OSC-inlet'. Those messages are always send to a receive
+called \$0-OSC. Just always use it that way. See the next part for
+an example useage.;
+#X connect 7 0 1 0;
diff --git a/memento/tutorial/MoreStates.dat b/memento/tutorial/MoreStates.dat
new file mode 100644
index 0000000..8fd6aaf
--- /dev/null
+++ b/memento/tutorial/MoreStates.dat
@@ -0,0 +1,22 @@
+myState-2 0 , aFloat , 50
+myState-2 0 , aSymbol , help
+myState-2 0 , aRadio , 3
+myState-2 1 , aFloat , 82
+myState-2 1 , aSymbol , me
+myState-2 1 , aRadio , 7
+TheStateName 0 , aFloat , 95
+TheStateName 0 , aSymbol , help
+TheStateName 0 , aRadio , 1
+TheStateName 1 , aFloat , 60
+TheStateName 1 , aSymbol , hi
+TheStateName 1 , aRadio , 4
+oneState 0 , aFloat , 30
+oneState 0 , aSymbol , ImFirst
+oneState 0 , aRadio , 4
+oneState 1 , aSymbol , hi
+anotherState 0 , aFloat , 109
+anotherState 0 , aSymbol , IamNumberTwo
+anotherState 0 , aRadio , 1
+anotherState 1 , aFloat , 144
+anotherState 1 , aSymbol , second
+anotherState 1 , aRadio , 7
diff --git a/memento/tutorial/OSCAbstraction.pd b/memento/tutorial/OSCAbstraction.pd
new file mode 100644
index 0000000..d7c3617
--- /dev/null
+++ b/memento/tutorial/OSCAbstraction.pd
@@ -0,0 +1,32 @@
+#N canvas 128 135 527 326 10;
+#X floatatom 61 224 5 0 0 1 aFloat - -;
+#X obj 258 231 hradio 15 1 0 8 empty empty aRadio 0 -6 0 8 -262144
+-1 -1 4;
+#X msg 52 137 set;
+#X msg 89 137 substate \$1;
+#X obj 59 86 tgl 24 0 empty empty Toggles_Between_2_Substates 0 -6
+0 10 -225280 -1 -1 0 1;
+#X obj 59 113 t b f;
+#X symbolatom 313 159 10 0 0 2 aSymbol - -;
+#X obj 240 152 symbol;
+#X text 201 173 Symbols need another 'symbol' object!;
+#X obj 52 162 originator \$1 \$0;
+#X obj 208 98 inlet;
+#X text 262 99 OSC-In;
+#X obj 240 128 commun /aSymbol \$0;
+#X obj 56 253 commun /aFloat \$0;
+#X obj 252 259 commun /aRadio \$0;
+#X connect 0 0 13 0;
+#X connect 1 0 14 0;
+#X connect 2 0 9 0;
+#X connect 3 0 9 0;
+#X connect 4 0 5 0;
+#X connect 5 0 2 0;
+#X connect 5 1 3 0;
+#X connect 6 0 12 0;
+#X connect 7 0 6 0;
+#X connect 10 0 9 1;
+#X connect 12 0 7 0;
+#X connect 13 0 0 0;
+#X connect 14 0 1 0;
+#X coords 0 0 1 1 400 140 1;
diff --git a/memento/tutorial/TheStateName.dat b/memento/tutorial/TheStateName.dat
new file mode 100644
index 0000000..a1c718e
--- /dev/null
+++ b/memento/tutorial/TheStateName.dat
@@ -0,0 +1,6 @@
+TheStateName 0 , aFloat , 27
+TheStateName 0 , aSymbol , help
+TheStateName 0 , aRadio , 1
+TheStateName 1 , aFloat , 60
+TheStateName 1 , aSymbol , hi
+TheStateName 1 , aRadio , 4
diff --git a/memento/tutorial/anAbstraction.pd b/memento/tutorial/anAbstraction.pd
new file mode 100644
index 0000000..3038356
--- /dev/null
+++ b/memento/tutorial/anAbstraction.pd
@@ -0,0 +1,29 @@
+#N canvas 128 135 527 326 10;
+#X floatatom 58 189 5 0 0 0 - - -;
+#X obj 54 270 commun aRadio \$0;
+#X obj 53 218 commun aFloat \$0;
+#X obj 60 242 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1
+-1 0;
+#X msg 52 137 set;
+#X msg 89 137 substate \$1;
+#X obj 59 86 tgl 24 0 empty empty Toggles_Between_2_Substates 0 -6
+0 10 -225280 -1 -1 0 1;
+#X obj 59 113 t b f;
+#X symbolatom 305 202 10 0 0 2 type_something_here - -;
+#X obj 232 171 commun aSymbol \$0;
+#X obj 232 195 symbol;
+#X text 193 216 Symbols need another 'symbol' object!;
+#X obj 52 162 originator \$1 \$0;
+#X connect 0 0 2 0;
+#X connect 1 0 3 0;
+#X connect 2 0 0 0;
+#X connect 3 0 1 0;
+#X connect 4 0 12 0;
+#X connect 5 0 12 0;
+#X connect 6 0 7 0;
+#X connect 7 0 4 0;
+#X connect 7 1 5 0;
+#X connect 8 0 9 0;
+#X connect 9 0 10 0;
+#X connect 10 0 8 0;
+#X coords 0 0 1 1 400 140 1;
diff --git a/memento/tutorial/miniab.pd b/memento/tutorial/miniab.pd
new file mode 100644
index 0000000..f212025
--- /dev/null
+++ b/memento/tutorial/miniab.pd
@@ -0,0 +1,18 @@
+#N canvas 82 160 413 225 10;
+#X obj 27 180 originator \$1 \$0;
+#X obj 27 130 t b f;
+#X msg 27 155 set;
+#X msg 57 153 substate \$1;
+#X floatatom 27 90 5 0 0 3 presets - -;
+#X obj 150 65 inlet OSC;
+#X obj 211 124 commun /myFloat \$0;
+#X floatatom 249 91 5 0 0 3 myFloat - -;
+#X connect 1 0 2 0;
+#X connect 1 1 3 0;
+#X connect 2 0 0 0;
+#X connect 3 0 0 0;
+#X connect 4 0 1 0;
+#X connect 5 0 0 1;
+#X connect 6 0 7 0;
+#X connect 7 0 6 0;
+#X coords 0 0 1 1 140 50 1;
diff --git a/memento/tutorial/neu.dat b/memento/tutorial/neu.dat
new file mode 100644
index 0000000..f4e1c31
--- /dev/null
+++ b/memento/tutorial/neu.dat
@@ -0,0 +1,22 @@
+anotherState 0 , aRadio , 7
+anotherState 0 , aFloat , 9
+anotherState 0 , aSymbol , zwei
+anotherState 1 , aRadio , 0
+anotherState 1 , aFloat , 31
+anotherState 1 , aSymbol , zweieinhalb
+myState-2 0 , aRadio , 3
+myState-2 0 , aFloat , 50
+myState-2 0 , aSymbol , help
+myState-2 1 , aRadio , 7
+myState-2 1 , aFloat , 82
+myState-2 1 , aSymbol , me
+oneState 0 , aRadio , 3
+oneState 0 , aFloat , 9
+oneState 0 , aSymbol , eins
+oneState 1 , aRadio , 7
+TheStateName 0 , aRadio , 1
+TheStateName 0 , aFloat , 27
+TheStateName 0 , aSymbol , help
+TheStateName 1 , aRadio , 4
+TheStateName 1 , aFloat , 60
+TheStateName 1 , aSymbol , hi
diff --git a/memento/tutorial/savedState.dat b/memento/tutorial/savedState.dat
new file mode 100644
index 0000000..7532a60
--- /dev/null
+++ b/memento/tutorial/savedState.dat
@@ -0,0 +1,6 @@
+myState-2 0 , aFloat , 50
+myState-2 0 , aSymbol , help
+myState-2 0 , aRadio , 3
+myState-2 1 , aFloat , 82
+myState-2 1 , aSymbol , me
+myState-2 1 , aRadio , 7
diff --git a/memento/tutorial/tutorial.pd b/memento/tutorial/tutorial.pd
new file mode 100644
index 0000000..5cd436b
--- /dev/null
+++ b/memento/tutorial/tutorial.pd
@@ -0,0 +1,15 @@
+#N canvas 440 304 450 300 10;
+#X obj 124 153 hradio 15 0 0 8 part empty Goto_part 0 -6 128 8 -262144
+-1 -1 0;
+#X obj 9 7 cnv 15 100 20 empty empty Using_Memento 20 12 1 14 -262144
+-66577 0;
+#N canvas 0 0 450 300 nav 0;
+#X obj 82 38 r part;
+#X msg 79 75 \; pd open \$1-tut.pd .;
+#X connect 0 0 1 0;
+#X restore 317 15 pd nav;
+#X text 19 65 This is a tutorial explaing the Memento preset system.
+To use it \, make sure \, the directory containing the memento patches
+is in you pd-path \, then navigate through the tutorial parts with
+the following radio button:;
+#X floatatom 158 192 5 0 0 0 currently_viewing part -;