[PD-cvs] abstractions/footils/sssad README.txt, NONE, 1.1 sssad-example.pd, NONE, 1.1 sssad-help.pd, NONE, 1.1 sssad.pd, NONE, 1.1 sssliders.pd, NONE, 1.1

Frank Barknecht fbar at users.sourceforge.net
Thu Apr 6 17:32:26 CEST 2006


Update of /cvsroot/pure-data/abstractions/footils/sssad
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24126/sssad

Added Files:
	README.txt sssad-example.pd sssad-help.pd sssad.pd 
	sssliders.pd 
Log Message:
sssad imported



--- NEW FILE: sssad.pd ---
#N canvas 584 398 564 509 10;
#X obj 153 54 inlet;
#X obj 153 417 outlet;
#X obj 153 395 list;
#X obj 176 161 r SSSAD;
#X obj 218 134 s SSSAD;
#X obj 218 112 list prepend \$1;
#X obj 176 189 list trim;
#X obj 218 54 inlet;
#X obj 56 308 r SSSAD_ADMIN;
#X obj 56 356 b;
#X obj 56 334 route set;
#X obj 153 81 b;
#X obj 176 252 route \$1;
#X obj 191 282 s \$0-sssad-data;
#X obj 241 335 _sssad/singleton \$1.SSAD sssad-persistence \$1 \$0;
#X obj 241 362 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X connect 0 0 11 0;
#X connect 2 0 1 0;
#X connect 3 0 6 0;
#X connect 5 0 4 0;
#X connect 6 0 12 0;
#X connect 7 0 5 0;
#X connect 8 0 10 0;
#X connect 9 0 2 0;
#X connect 10 0 9 0;
#X connect 11 0 2 0;
#X connect 12 0 2 1;
#X connect 12 0 13 0;
#X connect 14 0 15 0;

--- NEW FILE: sssad-example.pd ---
#N canvas 115 129 628 579 10;
#X msg 155 178 bang;
#X msg 270 177 bang;
#X msg 43 148 bang;
#X msg 348 174 bang;
#X obj 348 229 print y2;
#X obj 270 231 print y1;
#X obj 155 228 print x2;
#X obj 88 227 print x1;
#X obj 392 173 pack 0 1 2 3;
#X floatatom 392 152 5 0 0 0 - - -;
#X msg 206 173 y;
#X msg 199 153 x;
#X obj 88 198 sssad x;
#X obj 155 198 sssad x;
#X obj 270 201 sssad y;
#X obj 348 199 sssad y;
#X obj 88 158 t b a;
#X msg 88 129 list one 2 3 \$1;
#X floatatom 88 107 5 0 0 0 - - -;
#X obj 90 324 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 5000 1;
#X obj 87 295 sssad slider;
#X obj 241 323 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
-1 -1 3500 1;
#X obj 241 297 sssad vsl;
#X obj 88 383 sssliders /x;
#X obj 40 20 cnv 15 150 40 empty empty empty 20 12 0 14 -233017 -66577
0;
#N canvas 657 130 430 629 state-saving 1;
#X obj 13 315 cnv 15 400 300 empty empty Restore 300 12 0 14 -233017
-123526 0;
#X obj 13 12 cnv 15 400 300 empty empty Save 300 12 0 14 -233017 -123526
0;
#X obj 239 237 textfile;
#X msg 128 138 clear;
#X msg 313 220 print;
#X obj 239 161 list prepend add;
#X obj 239 187 list trim;
#X obj 86 520 textfile;
#X obj 86 550 s SSSAD;
#X obj 86 462 until;
#X msg 86 441 100;
#X msg 30 503 print;
#X text 81 572 also received inside sssad;
#X obj 106 238 s SSSAD_ADMIN;
#X obj 239 93 r SSSAD_ADMIN;
#X obj 239 137 route persist;
#X obj 239 115 list trim;
#X msg 106 172 save;
#X msg 120 211 set;
#X obj 154 547 s SSSAD_ADMIN;
#X msg 154 522 set;
#X obj 84 59 savepanel;
#X obj 84 102 t a b b;
#X msg 84 285 write \$1;
#X obj 84 31 bng 24 250 50 0 empty empty save 0 -6 0 8 -262144 -1 -1
;
#X obj 86 418 t b a;
#X msg 133 463 read \$1 \, rewind;
#X obj 86 337 bng 24 250 50 0 empty empty load 0 -6 0 8 -262144 -1
-1;
#X obj 86 365 openpanel;
#X text 118 441 Avoid loops. A bang normally also works.;
#X obj 84 81 symbol;
#X msg 27 63 bang;
#X text 25 43 again;
#X obj 86 395 symbol;
#X msg 29 378 bang;
#X text 27 358 again;
#X text 40 597 Hint: get creative with the [OSCroute] external!;
#X connect 3 0 2 0;
#X connect 4 0 2 0;
#X connect 5 0 6 0;
#X connect 6 0 2 0;
#X connect 7 0 8 0;
#X connect 7 1 9 1;
#X connect 7 1 20 0;
#X connect 9 0 7 0;
#X connect 10 0 9 0;
#X connect 11 0 7 0;
#X connect 14 0 16 0;
#X connect 15 0 5 0;
#X connect 16 0 15 0;
#X connect 17 0 13 0;
#X connect 18 0 13 0;
#X connect 20 0 19 0;
#X connect 21 0 30 0;
#X connect 22 0 23 0;
#X connect 22 1 17 0;
#X connect 22 2 3 0;
#X connect 23 0 2 0;
#X connect 24 0 21 0;
#X connect 25 0 10 0;
#X connect 25 1 26 0;
#X connect 26 0 7 0;
#X connect 27 0 28 0;
#X connect 28 0 33 0;
#X connect 30 0 22 0;
#X connect 31 0 30 0;
#X connect 33 0 25 0;
#X connect 34 0 33 0;
#X restore 54 32 pd state-saving;
#X obj 88 461 sssliders /y;
#X connect 0 0 13 0;
#X connect 1 0 14 0;
#X connect 2 0 12 0;
#X connect 3 0 15 0;
#X connect 8 0 15 1;
#X connect 9 0 8 0;
#X connect 10 0 13 1;
#X connect 11 0 13 1;
#X connect 12 0 7 0;
#X connect 13 0 6 0;
#X connect 14 0 5 0;
#X connect 15 0 4 0;
#X connect 16 0 12 0;
#X connect 16 1 12 1;
#X connect 17 0 16 0;
#X connect 18 0 17 0;
#X connect 19 0 20 1;
#X connect 20 0 19 0;
#X connect 21 0 22 1;
#X connect 22 0 21 0;

--- NEW FILE: README.txt ---
sssad is Stupidsupersimplistic State Saving ADVANCED
====================================================

[sssad] is an abstraction to simplify saving of data inside a Pd patch to a
file. See [sssad-help] for a reference, and [sssad-example] for how to use it.

Author(s)
========

[sssad] was written by Frank Barknecht <fbar at footils.org> and was inspired from
a discussion about Max's [pv] and [pvar] objects on pd-list brought up by "Item
State"

Internally it uses [singleton] which goes back to an idea by Enrique Erne and
IOhannes m zmoelnig plus [list_argument] which was ripped of from
Hans-Christoph Steiner's [float_argument]

License
=======

The same as Pd's license, with me as author: 

Copyright:

This software is copyrighted by Frank Barknecht and others.  The following
terms apply to all files associated with the software unless explicitly
disclaimed in individual files.

The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.

IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.

RESTRICTED RIGHTS: Use, duplication or disclosure by the government
is subject to the restrictions as set forth in subparagraph (c) (1) (ii)
of the Rights in Technical Data and Computer Software Clause as DFARS
252.227-7013 and FAR 52.227-19.

--- NEW FILE: sssad-help.pd ---
#N canvas 205 58 722 694 10;
#X obj 177 20 cnv 15 450 25 empty empty empty 10 12 1 12 -1 -262144
0;
#X obj 174 17 cnv 15 450 25 empty empty empty 10 12 1 12 -176779 -262144
0;
#X obj 171 14 cnv 15 450 25 empty empty sssad_-_Stupidsupersimplistic-State-Saving_ADVANCED
10 12 1 12 -258699 -262144 0;
#X text 170 73 [sssad] is used for saving and restoring state data
spread around in a patch to a textfile composed of "tagged" messages.
;
#X obj 32 77 sssad key;
#N canvas 489 130 587 611 SSAD-globals 0;
#X obj 24 25 r SSSAD;
#X obj 24 49 spigot;
#X obj 72 47 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X obj 24 71 print SSSAD;
#X obj 22 316 spigot;
#X obj 70 314 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X obj 22 292 r SSSAD_ADMIN;
#X obj 22 338 print SSSAD_ADMIN;
#X text 137 289 SSSAD_ADMIN is used to send administrative messages
to all [sssad] objects.;
#X obj 23 554 s SSSAD_ADMIN;
#X msg 23 464 save;
#X msg 23 415 set;
#X text 21 375 SSSAD_ADMIN accepts the following meta-messages:;
#X text 134 414 set: make all [sssad] objects output their current
values to their outlets.;
#X text 134 464 save: let exactly one [ssssad] object per tag-key send
a message composed of the word "persist" \, the current tag-key and
the values to the receiver called SSSAD_ADMIN.;
#X text 135 514 You may use this to save key/value-data to a [textfile].
;
#X obj 23 145 s SSSAD;
#X msg 23 120 key 5 6 7 8;
#X obj 24 198 s SSSAD;
#X msg 24 173 list key a b c;
#X text 137 118 It is possible to remotely set a sssad-value through
the SSSAD-receiver;
#X text 135 40 SSSAD is a bus where the current sssad-data is communicated
between [sssad] instances:;
#X connect 0 0 1 0;
#X connect 1 0 3 0;
#X connect 2 0 1 1;
#X connect 4 0 7 0;
#X connect 5 0 4 1;
#X connect 6 0 4 0;
#X connect 10 0 9 0;
#X connect 11 0 9 0;
#X connect 17 0 16 0;
#X connect 19 0 18 0;
#X restore 28 562 pd SSAD-globals;
#X text 172 233 Using [ssssad];
#X text 171 247 ==============;
#X text 173 274 Using [ssssad] is very simple: [sssad] requires an
obligatory argument to name the key to store data at.;
#X text 169 321 The left inlet will accept a bang and make [sssad]
output the value currently stored at the key used in this [sssad].
;
#X obj 29 238 sssad key;
#X floatatom 87 211 5 0 0 0 - - -;
#X msg 29 212 bang;
#X obj 29 322 sssad key;
#X msg 29 296 bang;
#X symbolatom 87 297 10 0 0 0 - - -;
#X obj 29 423 sssad key;
#X obj 29 400 t b a;
#X msg 29 375 1 2 3 4;
#X obj 29 264 print @key_1;
#X obj 29 349 print @key_2;
#X obj 29 450 print @key_3;
#X text 171 358 The right inlet will accept anything and will store
that anything in all [sssad] objects of the same key. The right inlet
is *cold* and will not generate any output. Use a [trigger bang anything]
if you want direct output.;
#X obj 29 524 r SSSAD_ADMIN;
#X obj 30 500 r SSSAD;
#X text 173 498 [sssad] uses two global senders and receivers \, which
you can intercept to use for saving data to a file: SSSAD and SSSAD_ADMIN.
;
#X text 173 563 Detailed explanation inside.;
#X obj 29 634 sssad-example;
#X text 170 130 A tagged message in this context is a list-message
of elements whose first element denotes the key of the data \, while
the rest of the message are the values stored under that key.;
#X text 174 632 See [sssad-example] to get inspired for how to use
[sssad] in real life.;
#X connect 10 0 19 0;
#X connect 11 0 10 1;
#X connect 12 0 10 0;
#X connect 13 0 20 0;
#X connect 14 0 13 0;
#X connect 15 0 13 1;
#X connect 16 0 21 0;
#X connect 17 0 16 0;
#X connect 17 1 16 1;
#X connect 18 0 17 0;

--- NEW FILE: sssliders.pd ---
#N canvas 0 0 450 300 10;
#X obj 127 122 hsl 60 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 5900 1;
#X obj 127 137 hsl 60 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 1700 1;
#X obj 127 152 hsl 60 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 2400 1;
#X obj 124 209 sssad \$1/s1;
#X obj 124 231 sssad \$1/s2;
#X obj 124 251 sssad \$1/s3;
#X connect 0 0 3 1;
#X connect 1 0 4 1;
#X connect 2 0 5 1;
#X connect 3 0 0 0;
#X connect 4 0 1 0;
#X connect 5 0 2 0;
#X coords 0 -1 1 1 95 70 1 110 100;





More information about the Pd-cvs mailing list