[PD] PROBLEM: saving patch state .....solved but... :-/

federico xaero at inwind.it
Wed Sep 7 21:51:48 CEST 2005


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]
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: statesaving.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20050907/998839ac/attachment.txt>


More information about the Pd-list mailing list