I have a big problem: saving state of sliders.
I heard about 'state' which should be a builtin pd
object, but in 0.39-0 it is not available.
???????
basically i could implement state-saving of a slider/radio/numberbox in
a simple manner (see the attached patch).
simply connect the slider to a [set $1( object. which is connected to a
[0( object and back to the slider. now attach a [loadbang] to the [0(
object, or bang it when you like.
now saving the patch will keep (stored in the patch) the slider value.
i used 4 components for 1 slider. when using lots of sliders this work
could become tedious, and it take more more space inside my patches.
why pd can't handle automatically this task?
if I print a patch, i print ALSO the slider/nbx/radio values, and also
the table contents.
why there's a checkbox to "remember array contents", while it is not
present for those other objects?
more complex is to mess with multiple presets. in the attached patch
there is one example.
to implement multiple presets, the user has to:
put the [113 53 70 103( object (which is our "memory") inside a
subpatch, connected with [inlet] and [outlet], then when he wants to
keep a preset, duplicate that object (ctrl+c/ctrl+v)
this one is a way to operate a bit "primitive", but it could just be a
task handled interely by pd.
why pd doesn't care of saving presets?
P.S.: I heard about 'RRADical' patches too... but i can't get 'pool' to
compile:
$ bash ../flext/build.sh pd gcc build
make -f ../flext/buildsys/gnumake-sub.mak PLATFORM=lnx RTSYS=pd
COMPILER=gcc BUILDPATH=../flext/buildsys/ PKGINFO=package.txt
BUILDCLASS=ext TARGETMODE=release TARGETTYPE=single _build_
make[1]: Entering directory `/home/xaero/pool'
g++ -c -msse -mfpmath=sse -ffast-math -DNDEBUG -O3 -march=pentium4
-pthread -fPIC -DFLEXT_SYS=2 -I/usr/local/src/pd/src
-I/usr/local/include/flext source/main.cpp -o
pd-linux/release-single/main.opp
In file included from source/main.cpp:11:
source/pool.h:35: error: syntax error before `;' token
source/pool.h:80: error: type specifier omitted for parameter `Atoms'
source/pool.h:80: error: syntax error before `*' token
source/pool.h: In member function `BL flext_single::pooldir::Empty() const':
source/pool.h:62: error: syntax error before `;' token
source/pool.h:223: error: type specifier omitted for parameter `Atoms'
source/pool.h:223: error: syntax error before `*' token
source/pool.h:253: error: local class `class flext_single::pooldir::Empty()
const::pooldata' shall not have static data member `const A
flext_single::pooldir::Empty() const::pooldata::nullatom'
[lots of errors]
#N canvas 106 177 520 611 10;
#X obj 210 144 vsl 15 128 0 127 0 0 empty \$0-atk empty 0 -8 0 8 -262144
-1 -1 11300 1;
#X obj 240 144 vsl 15 128 0 127 0 0 empty \$0-dec empty 0 -8 0 8 -262144
-1 -1 5300 1;
#X obj 273 144 vsl 15 128 0 127 0 0 empty \$0-sus empty 0 -8 0 8 -262144
-1 -1 7000 1;
#X obj 303 144 vsl 15 128 0 127 0 0 empty \$0-rel empty 0 -8 0 8 -262144
-1 -1 10300 1;
#X msg 261 352 set \$1 \$2 \$3 \$4;
#X msg 211 372 113 53 70 103;
#X obj 211 392 unpack 0 0 0 0;
#X msg 150 226 save;
#X obj 211 412 s \$0-atk;
#X obj 242 432 s \$0-dec;
#X obj 273 452 s \$0-sus;
#X obj 304 472 s \$0-rel;
#X msg 150 249 load;
#X obj 211 292 pack s f f f f;
#X obj 211 332 route load save;
#X obj 211 352 bang;
#X obj 211 312 route list;
#X obj 40 44 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144
-1 -1 0 1;
#X msg 71 65 set \$1;
#X msg 71 114 0;
#X obj 79 87 loadbang;
#X text 30 13 simple state saving object:;
#X text 203 110 state saving for array of objects:;
#X connect 0 0 13 1;
#X connect 1 0 13 2;
#X connect 2 0 13 3;
#X connect 3 0 13 4;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 0 8 0;
#X connect 6 1 9 0;
#X connect 6 2 10 0;
#X connect 6 3 11 0;
#X connect 7 0 13 0;
#X connect 12 0 13 0;
#X connect 13 0 16 0;
#X connect 14 0 15 0;
#X connect 14 1 4 0;
#X connect 15 0 5 0;
#X connect 16 0 14 0;
#X connect 17 0 18 0;
#X connect 18 0 19 0;
#X connect 19 0 17 0;
#X connect 20 0 19 0;