Hi
I'm trying to build something generic for performing live with pd and for the most parts, it's going really well.
But I need to save the state of "everything" (a patch with some instances of some abstractions), so that the widgets will preserve their state between sessions.
I looked into memento, but couldn't make it do anything useful, not even the manuals/memento/* stuff. Is memento broken and if not, could someone provide a brief example of how to use it. If broken, what other options are there?
Thanks in advance for any response.
Hi Atte
The best way to start using memento is to get a patch that works, copy and paste the guts into your own and adapt. That is, providing that memento works at all on your system. There is a guide on footils.org that should get you started with the ideas behind the system. It works fine for me (I don't have pd handy right now so I cannot offer any specific pointers).
An alternative is apparently part of the pdmtl abstractions http://wiki.dataflow.ws/PdMtlAbstractions
I saw a presentation on if bu have not yet tried it. It is, arguably, simpler to adopt than memento.
On Thu, Jul 17, 2008 at 10:46 AM, Atte André Jensen atte.jensen@gmail.com wrote:
Hi
I'm trying to build something generic for performing live with pd and for the most parts, it's going really well.
But I need to save the state of "everything" (a patch with some instances of some abstractions), so that the widgets will preserve their state between sessions.
I looked into memento, but couldn't make it do anything useful, not even the manuals/memento/* stuff. Is memento broken and if not, could someone provide a brief example of how to use it. If broken, what other options are there?
Thanks in advance for any response.
-- peace, love & harmony Atte
http://atte.dk | http://myspace.com/attejensen http://anagrammer.dk | http://modlys.dk
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Michal Seta wrote:
Hi Atte
The best way to start using memento is to get a patch that works, copy and paste the guts into your own and adapt. That is, providing that memento works at all on your system. There is a guide on footils.org that should get you started with the ideas behind the system. It works fine for me (I don't have pd handy right now so I cannot offer any specific pointers).
An alternative is apparently part of the pdmtl abstractions http://wiki.dataflow.ws/PdMtlAbstractions
I saw a presentation on if bu have not yet tried it. It is, arguably, simpler to adopt than memento.
Both seems complex, and although I appreciate RRADical's (which it seems memento is part of) "paradigm", I'm still quite new to PD and would like to make a few mistakes and learn a few lessons before I "just" adopt someone else's approach.
However, http://footils.org/cms/show/1#persistence suggests that two, more basic, options exist: state and pool.
linux), but there's no state-help.pd anywhere. Where can I read about it? The above link mentions it "only saves gui", I might want to save content of table/arrays, is that not considered "gui"? If not, is there an obvious and therefore elegant of saving guis + tables/arrays with state?
isn't that part of pd-extended? I tried downloading it and compiling it myself, but failed: atte@ajstrup:~/music/synth/pd/externals/pool$ bash /usr/lib/pd/doc/manuals/flext/tutorial/build.sh linux pd gcc bash: ../build.sh: No such file or directory Obviously I have no clue about using flext, could someone help me getting this working?
At the end of the day, what would be the best bet, state, pool, memento or pdmtl?
I should note that what I'm trying to do is work out some abstractions for live electronica, and now I need a way to save piece1.pd and another_piece.pd which contains one or more instances of one or more of my abstractions, complete with gui settings and all. If I could just press "save all this, so everything I loaded in this patch is exactly the same when I open it again" I'd be sooo happy :-)
Hi Atte,
I am currently using a mix of sssad and rradical/memento in my live
performance setup. sssad is a little easier to implement, and works
great. For a good working example, see Chris McCormick's
"s-abstraction" library. Also, my [polywavesynth] uses sssad for
state-saving, and the help and example files show how to do this.
(See: http://www.pkstonemusic.com/polyWaveSynth.html ; look at the [pd
sssadStuff] subpatch in particular, and see in [polywavesynth-example]
how to load and save presets).
rradical/memento uses [pool] in its default configuration. Despite some very slight inconveniences associated with getting [pool]*, it's well worth it, as it's a very powerful hierarchical storage object. What it brings to rradical/memento that sssad does not have is a "substate" capability, which allows banks of presets, switchable by merely sending a preset number. This is very cool.
Frank Barknecht states in the documentation for rradical/memento that the underlying storage object for memento could be something besides [pool], but I must say that, personally speaking, modifying memento is daunting. For instance, I would like to change the organization of the hierarchy so that it is possible to cut and paste presets, but the hierarchy is not organized that way.
Luke Iannini has done a variation on memento called "semento" which adds some very nice functionality, including auto-mapping to controllers.
All in all, state-saving on Pd is not really mature, and it would be nice if there were an overall solution so that some standardization and refinement could take place. However, I think either sssad or rradical/memento would serve your purposes quite well.
Best,
Phil Stone pkstonemusic.com
http://lists.puredata.info/pipermail/pd-list/2008-01/058382.html
Atte André Jensen wrote:
Michal Seta wrote:
Hi Atte
The best way to start using memento is to get a patch that works, copy and paste the guts into your own and adapt. That is, providing that memento works at all on your system. There is a guide on footils.org that should get you started with the ideas behind the system. It works fine for me (I don't have pd handy right now so I cannot offer any specific pointers).
An alternative is apparently part of the pdmtl abstractions http://wiki.dataflow.ws/PdMtlAbstractions
I saw a presentation on if bu have not yet tried it. It is, arguably, simpler to adopt than memento.
Both seems complex, and although I appreciate RRADical's (which it seems memento is part of) "paradigm", I'm still quite new to PD and would like to make a few mistakes and learn a few lessons before I "just" adopt someone else's approach.
However, http://footils.org/cms/show/1#persistence suggests that two, more basic, options exist: state and pool.
- State. I can instantiate it in my 0.40-3extended-20080628 (under
linux), but there's no state-help.pd anywhere. Where can I read about it? The above link mentions it "only saves gui", I might want to save content of table/arrays, is that not considered "gui"? If not, is there an obvious and therefore elegant of saving guis + tables/arrays with state?
- Pool. I have the pool-help.pd file, but I cannot instantiate pool,
isn't that part of pd-extended? I tried downloading it and compiling it myself, but failed: atte@ajstrup:~/music/synth/pd/externals/pool$ bash /usr/lib/pd/doc/manuals/flext/tutorial/build.sh linux pd gcc bash: ../build.sh: No such file or directory Obviously I have no clue about using flext, could someone help me getting this working?
At the end of the day, what would be the best bet, state, pool, memento or pdmtl?
I should note that what I'm trying to do is work out some abstractions for live electronica, and now I need a way to save piece1.pd and another_piece.pd which contains one or more instances of one or more of my abstractions, complete with gui settings and all. If I could just press "save all this, so everything I loaded in this patch is exactly the same when I open it again" I'd be sooo happy :-)
Michal Seta wrote:
The best way to start using memento is to get a patch that works, copy and paste the guts into your own and adapt. That is, providing that memento works at all on your system. There is a guide on footils.org that should get you started with the ideas behind the system. It works fine for me (I don't have pd handy right now so I cannot offer any specific pointers).
An alternative is apparently part of the pdmtl abstractions http://wiki.dataflow.ws/PdMtlAbstractions
I saw a presentation on if bu have not yet tried it. It is, arguably, simpler to adopt than memento.
Both seems complex, and although I appreciate RRADical's (which it seems memento is part of) "paradigm", I'm still quite new to PD and would like to make a few mistakes and learn a few lessons before I "just" adopt someone else's approach.
However, http://footils.org/cms/show/1#persistence suggests that two, more basic, options exist: state and pool.
linux), but there's no state-help.pd anywhere. Where can I read about it? The above link mentions it "only saves gui", I might want to save content of table/arrays, is that not considered "gui"? If not, is there an obvious and therefore elegant of saving guis + tables/arrays with state?
isn't that part of pd-extended? I tried downloading it and compiling it myself, but failed: atte@ajstrup:~/music/synth/pd/externals/pool$ bash /usr/lib/pd/doc/manuals/flext/tutorial/build.sh linux pd gcc bash: ../build.sh: No such file or directory Obviously I have no clue about using flext, could someone help me getting this working?
At the end of the day, what would be the best bet, state, pool, memento or pdmtl?
I should note that what I'm trying to do is work out some abstractions for live electronica, and now I need a way to save piece1.pd and another_piece.pd which contains one or more instances of one or more of my abstractions, complete with gui settings and all. If I could just press "save all this, so everything I loaded in this patch is exactly the same when I open it again" I'd be sooo happy :-)
Atte André Jensen wrote:
At the end of the day, what would be the best bet, state, pool, memento or pdmtl?
I should note that what I'm trying to do is work out some abstractions for live electronica, and now I need a way to save piece1.pd and another_piece.pd which contains one or more instances of one or more of my abstractions, complete with gui settings and all. If I could just press "save all this, so everything I loaded in this patch is exactly the same when I open it again" I'd be sooo happy :-)
sssad, bag of tricks and netpd are worth mentioning here too.
i only know little about bag of tricks but its state saving approach is based on a message box per gop that allows you to save the state of the abstractions with your patch.
you should have a look at netpd level 3 (in netpd/tutorials), where all parameters can be saved and loaded in a preset file. basically something like that:
[symbol savename( | | [symbol loadname( | | [netpd-x mypatchname]
on top of that i wrote a little abstraction (pad) that handles these save-load-names for you and allows inter-patch-communication, so "save-all" does work.
[pad mypatchname]
|
[netpd-x mypatchname]
in a 2 approach there is one additional preset-manager (P-Admin) that talks to all (pads) and collects data and writes it to a single file. (instead of 1 preset per patch). the format here (unlike netpd native .pst format) is patchname parametername and-whatever-number-list-or-array-you-have-here
but once you are here you think about more...
other instances (osc?!)
dynamically create effects)
as i said, i think it's worth looking at the 3 approaches sssad, bot, netpd too
hope that helps or inspires.
eni
Hallo, Atte André Jensen hat gesagt: // Atte André Jensen wrote:
Both seems complex, and although I appreciate RRADical's (which it seems memento is part of) "paradigm", I'm still quite new to PD and would like to make a few mistakes and learn a few lessons before I "just" adopt someone else's approach.
Then I would recommend [sssad]. It's the most simple of them all and doesn't need any externals. (Note that it's missing from pd-extended's autobuilds currently for reasons I don't understand.)
What I prefer about [sssad] over "memento" is that it's backend agnostic. Memento for example is very much tied to [pool], while with [sssad] you can (and have to) implement your own storage. You can use [textfile], message boxes, [pool] or anything that can receive and send messages. [sssad] just is a listening to what goes on in a patch but doesn't touch the harddisk itself.
Oh, and forget about [state], it's only for number boxes and a state of a patch is so much more than what's shown in number boxes, that it's not worth bothering with [state] (unless you want to save number box contents)
Frank Barknecht _ ______footils.org__
Frank Barknecht wrote:
Then I would recommend [sssad]. It's the most simple of them all and doesn't need any externals. (Note that it's missing from pd-extended's autobuilds currently for reasons I don't understand.)
Ok, thanks for all the advice, I'll look at sssad, then.
First problem: It seems it's there, but broken (is it my that's broken?):
/usr/lib/pd/extra/sssad /usr/lib/pd/extra/sssad/sssad.pd /usr/lib/pd/extra/sssad/sssad-help.pd /usr/lib/pd/extra/sssad/_sssad /usr/lib/pd/extra/sssad/_sssad/singleton-help.pd /usr/lib/pd/extra/sssad/_sssad/sssad-persistence.pd /usr/lib/pd/extra/sssad/_sssad/singleton.pd /usr/lib/pd/extra/sssad/_sssad/list_argument.pd /usr/lib/pd/extra/sssad/sssad-example.pd /usr/lib/pd/extra/sssad/sssad-meta.pd /usr/lib/pd/extra/sssad/sssliders.pd
but creating a single [sssad] object gives:
libdir_loader: added 'sssad' to the canvas-local objectclass path ... ... libdir_loader: added 'sssad' to the canvas-local objectclass path libdir_loader: added 'sssad' to the canvas-local objectclass path libdir_loader: added 'sssad' to the canvas-local objectclass path libdir_loader: added 'sssad' to the canvas-local objectclass path error: maximum object loading depth 1000 reached sssad ... couldn't create
However google suggested that I should create [sssad/sssad], and that worked. Unfortunately right-clicking->help totally freezes up my system (something that never happens). What's up with that? Is that just a single bug (so "don't click here") or a symptom of something bad?
Should I try to rescue what's there (and if so, what to do) or abandon it and install just sssad anew (and if so how/from where).
Additional question: I never saw the slash in objects (like in [sssad/ssad]) before, it that some kind of namespace thing? Where can I read more on that, including pros/cons and recommended ways/conventions?
Am 21.07.2008 um 20:16 schrieb Atte André Jensen:
Frank Barknecht wrote:
Then I would recommend [sssad]. It's the most simple of them all and doesn't need any externals. (Note that it's missing from pd- extended's autobuilds currently for reasons I don't understand.)
Ok, thanks for all the advice, I'll look at sssad, then.
First problem: It seems it's there, but broken (is it my that's
broken?):/usr/lib/pd/extra/sssad /usr/lib/pd/extra/sssad/sssad.pd /usr/lib/pd/extra/sssad/sssad-help.pd /usr/lib/pd/extra/sssad/_sssad /usr/lib/pd/extra/sssad/_sssad/singleton-help.pd /usr/lib/pd/extra/sssad/_sssad/sssad-persistence.pd /usr/lib/pd/extra/sssad/_sssad/singleton.pd /usr/lib/pd/extra/sssad/_sssad/list_argument.pd /usr/lib/pd/extra/sssad/sssad-example.pd /usr/lib/pd/extra/sssad/sssad-meta.pd /usr/lib/pd/extra/sssad/sssliders.pd
but creating a single [sssad] object gives:
libdir_loader: added 'sssad' to the canvas-local objectclass path ... ... libdir_loader: added 'sssad' to the canvas-local objectclass path libdir_loader: added 'sssad' to the canvas-local objectclass path libdir_loader: added 'sssad' to the canvas-local objectclass path libdir_loader: added 'sssad' to the canvas-local objectclass path error: maximum object loading depth 1000 reached sssad ... couldn't create
However google suggested that I should create [sssad/sssad], and that worked. Unfortunately right-clicking->help totally freezes up my
system (something that never happens). What's up with that? Is that just a single bug (so "don't click here") or a symptom of something bad?
Did i have tat onc, too ??
because of "prepend" - "list prepend" ??
I am not sure
Should I try to rescue what's there (and if so, what to do) or abandon it and install just sssad anew (and if so how/from where).
Additional question: I never saw the slash in objects (like in [sssad/ssad]) before, it that some kind of namespace thing? Where
can I read more on that, including pros/cons and recommended ways/ conventions?
Its all in the mailing list archives ;-) One favourite subject, i
guess...
-- peace, love & harmony Atte
http://atte.dk | http://myspace.com/attejensen http://anagrammer.dk | http://modlys.dk
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
---------------------------------------<
Luigi Rensinghoff luigi.rensinghoff@freenet.de skype:gigischinke ichat:gigicarlo
Luigi Rensinghoff wrote:
Am 21.07.2008 um 20:16 schrieb Atte André Jensen:
Unfortunately right-clicking->help totally freezes up my system (something that never happens). What's up with that? Is that just a single bug (so "don't click here") or a symptom of something bad?
Did i have tat onc, too ?? because of "prepend" - "list prepend" ?? I am not sure
I don't think I understand...
Should I try to rescue what's there (and if so, what to do) or abandon it and install just sssad anew (and if so how/from where).
Additional question: I never saw the slash in objects (like in [sssad/ssad]) before, it that some kind of namespace thing? Where can I read more on that, including pros/cons and recommended ways/conventions?
Its all in the mailing list archives ;-) One favourite subject, i guess...
I'll see if I can dig some pieces out. I was more thinking of the big picture in one sentence...
Hallo, Atte André Jensen hat gesagt: // Atte André Jensen wrote:
Ok, thanks for all the advice, I'll look at sssad, then.
First problem: It seems it's there, but broken (is it my that's broken?):
Pd-extended is broken in that it cannot load abstractions that are in directories which have the same name as the abstraction. At least that's how I understand the problem. Users of upstream Pd like me aren't affected.
However google suggested that I should create [sssad/sssad],
Don't believe google: the official name for [sssad] is [sssad].
But see below.
and that worked. Unfortunately right-clicking->help totally freezes up my system (something that never happens). What's up with that? Is that just a single bug (so "don't click here") or a symptom of something bad?
Maybe it's the same issue of pd-extended that makes it fail to load [sssad]? I have no idea.
Additional question: I never saw the slash in objects (like in [sssad/ssad]) before, it that some kind of namespace thing? Where can I read more on that, including pros/cons and recommended ways/conventions?
Can of worms here, you may want to read up in the archives.
Basically it's like this: If your -path setting points to "somedir" and there is a directory "test" in it like "somedir/test", then you can load an abstration "myabs.pd" in "test" like this:
[test/myabs]
This use of directory prefixes as a primitive namespace replacement is tricky, however. For one, you also have to set the -helppath to "somedir", if you want to let Pd find the test/myabs-help.pd file in. This helpfile next to myabs.pd can use [myabs] directly, without prefix.
But if you put the helpfile somewhere else, say into /doc/5.reference, then it won't find [myabs] without directory prefix anymore, so it has to use [test/myabs]. But if it uses [test/myabs] it won't work anymore if you copy myabs.pd and myabs-help.pd directly into your -path or into some other directory with a different name than "test"!
Directory prefixes can make things messy, if you want to just copy abstractions around, e.g. to make self-contained packages or use project directories with everthing included.
Pd-extended installs sssad.pd into extra/sssad/sssad.pd and as "extra" is in your pd-path, you can create [sssad/sssad] in pd-extended as well as [sssad] - or you used to until something broke. I was never fond of the additional and redundant "sssad/sssad", but I'm all for freedom of choice so people may do whatever they like. But the official name as far as I'm concerned is [sssad].
As a workaround you can move the content of extra/sssad into the "extra" directory or another directory of your Pd-path.
E.g. if you have a checkout of the Pd subversion trunk in "PDSVN", you can use this in your .pdrc:
-path PDSVN/trunk/abstractions/footils/sssad/
to always load the "trunk" version of sssad.
Frank Barknecht _ ______footils.org__
Frank Barknecht wrote:
Pd-extended is broken in that it cannot load abstractions that are in directories which have the same name as the abstraction. At least that's how I understand the problem. Users of upstream Pd like me aren't affected.
I see. I found this has been has been discussed very recently, and I read the thread, and feel somewhat enlightend.
Maybe it's the same issue of pd-extended that makes it fail to load [sssad]? I have no idea.
After moving sssad* to extra (see below) sssad-help.pd also works. Seems to be related...
Additional question: I never saw the slash in objects (like in [sssad/ssad]) before, it that some kind of namespace thing? Where can I read more on that, including pros/cons and recommended ways/conventions?
Can of worms here, you may want to read up in the archives.
Thanks for the heads up!
As a workaround you can move the content of extra/sssad into the "extra" directory or another directory of your Pd-path.
Ok, that seems to work. I can even make sssad-example.pd load/restore form file. That's great, now I have something working and play with that and see where it takes me.
Hi Atte,
Now that you're on your way with sssad, there's a nice trick you should know. If you find that loading a preset causes dropouts, consider using a ram disk to hold your presets during performance. This solved all my dropout problems, and it's easy to do (I can post a script for OS X if anyone wants it).
Phil
Atte André Jensen wrote:
Frank Barknecht wrote:
Pd-extended is broken in that it cannot load abstractions that are in directories which have the same name as the abstraction. At least that's how I understand the problem. Users of upstream Pd like me aren't affected.
I see. I found this has been has been discussed very recently, and I read the thread, and feel somewhat enlightend.
Maybe it's the same issue of pd-extended that makes it fail to load [sssad]? I have no idea.
After moving sssad* to extra (see below) sssad-help.pd also works. Seems to be related...
Additional question: I never saw the slash in objects (like in [sssad/ssad]) before, it that some kind of namespace thing? Where can I read more on that, including pros/cons and recommended ways/conventions?
Can of worms here, you may want to read up in the archives.
Thanks for the heads up!
As a workaround you can move the content of extra/sssad into the "extra" directory or another directory of your Pd-path.
Ok, that seems to work. I can even make sssad-example.pd load/restore form file. That's great, now I have something working and play with that and see where it takes me.
Phil Stone wrote:
Now that you're on your way with sssad, there's a nice trick you should know. If you find that loading a preset causes dropouts, consider using a ram disk to hold your presets during performance. This solved all my dropout problems, and it's easy to do (I can post a script for OS X if anyone wants it).
Thanks for the tip, sounds like something I would have to struggle with at some point. I think I can figure out how to set it up with a ram disk, but we'll see about that :-)
Phil Stone wrote:
Hi Atte,
Now that you're on your way with sssad, there's a nice trick you should know. If you find that loading a preset causes dropouts, consider using a ram disk to hold your presets during performance. This solved all my dropout problems, and it's easy to do (I can post a script for OS X if anyone wants it).
Hi Phil
yes please post the script.
thanks eni
Hi,
Enrique Erne wrote:
Phil Stone wrote:
Hi Atte,
Now that you're on your way with sssad, there's a nice trick you should know. If you find that loading a preset causes dropouts, consider using a ram disk to hold your presets during performance.
This solved all my dropout problems, and it's easy to do (I can post a script for OS X if anyone wants it).Hi Phil
yes please post the script.
thanks eni
OK. Most of this script is error checking; three lines do all the real work.
This creates the ram disk as a volume called "RamDisk". You can change that name, if you like, by editing the line that begins with "DISK_NAME=..." ____________________________
#!/bin/bash #echo "Creating ramdisk..." if [ -n "$2" ]; then ARG_ERR=ERR; fi if [ -z "$1" ]; then ARG_ERR=ERR; fi if [ -n "$ARG_ERR" ]; then echo 1 argument: size in MB exit fi
MB_SIZE=$1
let "MB_SIZE *= 2048"
echo Creating ${MB_SIZE} 512-blocks ramdisk
CREATED_RAMDISK=hdiutil attach -nomount ram://${MB_SIZE}
echo New block device: ${CREATED_RAMDISK}
DISK_NAME="RamDisk" echo Creating volume with label: ${DISK_NAME} newfs_hfs -v ${DISK_NAME} ${CREATED_RAMDISK} echo Mounting in /Volumes/${DISK_NAME} diskutil mount ${CREATED_RAMDISK}
exit 0 ___________________________
In my case, I call this from another script, which copies the presets I need into the ram disk:
#!/bin/bash # Create a 2M ramdisk: ~/ramdisk 2
# Copy music data to it cp -R ~/PD_Patches/Presets/ /Volumes/RamDisk/Presets/ cp -R ~/PD_Patches/Presets_Meta/ /Volumes/RamDisk/Presets_Meta/ cp -R ~/PD_Patches/Scales/ /Volumes/RamDisk/Scales/ exit 0 _____________________________
Note that this works well for presets, and would probably be okay with small sound files. However, all that's really happening is that the load time is shorter because of faster access to ram as opposed to hard drive. If you load a big enough file, even from ram disk, and it takes longer than one dsp cycle to load, you'll still get dropouts.
Phil Stone pkstonemusic.com
On Jul 22, 2008, at 2:31 AM, Enrique Erne wrote:
Phil Stone wrote:
Hi Atte,
Now that you're on your way with sssad, there's a nice trick you
should know. If you find that loading a preset causes dropouts, consider
using a ram disk to hold your presets during performance. This solved
all my dropout problems, and it's easy to do (I can post a script for OS
X if anyone wants it).
The ramdisk thing is definitely handy, I just hope that sssad can be
tweaked to work without causing dropouts. Any ideas what the cause is?
.hc
Looking at things from a more basic level, you can come up with a
more direct solution... It may sound small in theory, but it in
practice, it can change entire economies. - Amy Smith
Hi Hans,
I don't think this is anything to do with sssad, really. It is due to Pd's lack of a threaded file loader/saver. The way I understand it (and this is borne out by my experience), if a file operation cannot complete within one dsp cycle, the next dsp cycle is delayed until after the file operation completes, thus causing dropouts.
Ram disks help (with files that are not too big) because they speed up the file operation to the point where it can happen safely within one dsp period.
This has been discussed many times on the list without any hope of change, but it would be so great for Pd's use in live performance if some tasks could be relegated to a background thread. Or, to put it another way, the dsp engine should have highest priority at all times.
Phil Stone pkstonemusic.com
Hans-Christoph Steiner wrote:
On Jul 22, 2008, at 2:31 AM, Enrique Erne wrote:
Phil Stone wrote:
Hi Atte,
Now that you're on your way with sssad, there's a nice trick you should know. If you find that loading a preset causes dropouts, consider using a ram disk to hold your presets during performance. This solved all my dropout problems, and it's easy to do (I can post a script for OS X if anyone wants it).
The ramdisk thing is definitely handy, I just hope that sssad can be tweaked to work without causing dropouts. Any ideas what the cause is?
.hc
Looking at things from a more basic level, you can come up with a more direct solution... It may sound small in theory, but it in practice, it can change entire economies. - Amy Smith
Part of the problem could also be that it is using canvas_open()
which means it searches the whole Path when using a relative name.
Try using absolute path names for the file to see if that speeds
things up (canvas_open() tries absolute file names first).
It would be possible to use a thread in [qlist] and [textfile]
without changing their behavior, but it would mean some trickery
would have to be used. Something like this:
done reading
Then as long as you don't send another message to [qlist] while it is
reading, it shouldn't cause an interruption. But it would still have
deterministic behavior, since it would always wait until the reading
was complete before processing more messages. Ideally, it would send
a message when it is done reading, so that you can use that to move
to the next step of the program.
Perhaps there is cause to make [fasttextfile] which is similar to
[textfile] but doesn't search the whole path like [qlist]/[textfile]
and uses thread/blocking/complete message I outlined above.
.hc
On Jul 23, 2008, at 10:54 AM, Phil Stone wrote:
Hi Hans,
I don't think this is anything to do with sssad, really. It is due
to Pd's lack of a threaded file loader/saver. The way I understand
it (and this is borne out by my experience), if a file operation
cannot complete within one dsp cycle, the next dsp cycle is delayed
until after the file operation completes, thus causing dropouts.Ram disks help (with files that are not too big) because they speed
up the file operation to the point where it can happen safely
within one dsp period.This has been discussed many times on the list without any hope of
change, but it would be so great for Pd's use in live performance
if some tasks could be relegated to a background thread. Or, to
put it another way, the dsp engine should have highest priority at
all times.Phil Stone pkstonemusic.com
Hans-Christoph Steiner wrote:
On Jul 22, 2008, at 2:31 AM, Enrique Erne wrote:
Phil Stone wrote:
Hi Atte,
Now that you're on your way with sssad, there's a nice trick you
should know. If you find that loading a preset causes dropouts,
consider using a ram disk to hold your presets during performance. This solved
all my dropout problems, and it's easy to do (I can post a script for
OS X if anyone wants it).The ramdisk thing is definitely handy, I just hope that sssad can
be tweaked to work without causing dropouts. Any ideas what the
cause is?.hc
Looking at things from a more basic level, you can come up with a
more direct solution... It may sound small in theory, but it in
practice, it can change entire economies. - Amy Smith
¡El pueblo unido jamás será vencido!
Sorry to chime in a bit late:
On Mon, Jul 21, 2008 at 10:11:23PM +0200, Atte André Jensen wrote:
As a workaround you can move the content of extra/sssad into the "extra" directory or another directory of your Pd-path.
Ok, that seems to work. I can even make sssad-example.pd load/restore form file. That's great, now I have something working and play with that and see where it takes me.
Contrary to Frank, I like to keep sssad in a directory so I can have a bunch of helper abstractions such as [sssad/auto] and [sssad/datastore]. The latter allows you to store all presets in-patch so you don't have to load and save from files, which is how i roll.
Here's a helper post on how I use sssad like this: http://lists.puredata.info/pipermail/pd-list/2006-12/045289.html
Also, someone commented that there is no way to store 'banks' of different presets with sssad. That is actually not true, and if you look through the archives you can see an example patch where Frank has done this. Infact, maybe it wasn't Frank, I think this could be the post: <http://lists.puredata.info/pipermail/pd-list/2007-04/049452.html?
Thanks again to Frank for making the sssad so happy!
Chris.
On Jul 21, 2008, at 3:46 PM, Frank Barknecht wrote:
Hallo, Atte André Jensen hat gesagt: // Atte André Jensen wrote:
Ok, thanks for all the advice, I'll look at sssad, then.
First problem: It seems it's there, but broken (is it my that's
broken?):Pd-extended is broken in that it cannot load abstractions that are in directories which have the same name as the abstraction. At least that's how I understand the problem. Users of upstream Pd like me aren't affected.
"Pd-extended is broken" is much too broad. Saying the whole thing is
broken doesn't help anyone. The problem is somewhere in the
relationship of the libdir loader and Pd's logic for checking if it
has already loaded a binary library. If you load a libdir called
"blah", you won't be able to load [blah/blah] or [blah].
.hc
However google suggested that I should create [sssad/sssad],
Don't believe google: the official name for [sssad] is [sssad].
But see below.
and that worked. Unfortunately right-clicking->help totally freezes up my system (something that never happens). What's up with that? Is that just a single bug (so "don't click here") or a symptom of something bad?
Maybe it's the same issue of pd-extended that makes it fail to load [sssad]? I have no idea.
Additional question: I never saw the slash in objects (like in [sssad/ssad]) before, it that some kind of namespace thing? Where
can I read more on that, including pros/cons and recommended ways/ conventions?Can of worms here, you may want to read up in the archives.
Basically it's like this: If your -path setting points to "somedir" and there is a directory "test" in it like "somedir/test", then you can load an abstration "myabs.pd" in "test" like this:
[test/myabs]
This use of directory prefixes as a primitive namespace replacement is tricky, however. For one, you also have to set the -helppath to "somedir", if you want to let Pd find the test/myabs-help.pd file in. This helpfile next to myabs.pd can use [myabs] directly, without prefix.
But if you put the helpfile somewhere else, say into /doc/5.reference, then it won't find [myabs] without directory prefix anymore, so it has to use [test/myabs]. But if it uses [test/myabs] it won't work anymore if you copy myabs.pd and myabs-help.pd directly into your -path or into some other directory with a different name than "test"!
Directory prefixes can make things messy, if you want to just copy abstractions around, e.g. to make self-contained packages or use project directories with everthing included.
Pd-extended installs sssad.pd into extra/sssad/sssad.pd and as "extra" is in your pd-path, you can create [sssad/sssad] in pd-extended as well as [sssad] - or you used to until something broke. I was never fond of the additional and redundant "sssad/sssad", but I'm all for freedom of choice so people may do whatever they like. But the official name as far as I'm concerned is [sssad].
As a workaround you can move the content of extra/sssad into the "extra" directory or another directory of your Pd-path.
E.g. if you have a checkout of the Pd subversion trunk in "PDSVN", you can use this in your .pdrc:
-path PDSVN/trunk/abstractions/footils/sssad/
to always load the "trunk" version of sssad.
Ciao
Frank Barknecht _
______footils.org__
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
I have the audacity to believe that peoples everywhere can have three
meals a day for their bodies, education and culture for their minds,
and dignity, equality and freedom for their spirits. - Martin
Luther King, Jr.
Hi
if you just need to save for example the "initial" state of the patch
init" switch, so it saves one state.
just with | set $1 (. With clever naming and the use of abstractions
you dont have to do much wiring
But be careful: Message Boxes dont save their state within
subpatches so they have to be in the "parent" patch. And actually
when PD crashes a lot it is a bit dangerous, because you may loose
all your settings before you can save them. of course you
can as well use textfile ore arrays, but just for saving ONE state
like the initial one you can get along with that, without having to
use sssad or memento.
On the other hand: sooner or later you will need them ;-) So
you can also dive into it from the beginning ;-)
Best Luigi
If you need an example patch, let me know
Am 17.07.2008 um 17:46 schrieb Atte André Jensen:
Hi
I'm trying to build something generic for performing live with pd and for the most parts, it's going really well.
But I need to save the state of "everything" (a patch with some instances of some abstractions), so that the widgets will preserve
their state between sessions.I looked into memento, but couldn't make it do anything useful, not
even the manuals/memento/* stuff. Is memento broken and if not, could
someone provide a brief example of how to use it. If broken, what other
options are there?Thanks in advance for any response.
-- peace, love & harmony Atte
http://atte.dk | http://myspace.com/attejensen http://anagrammer.dk | http://modlys.dk
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
---------------------------------------<
Luigi Rensinghoff luigi.rensinghoff@freenet.de skype:gigischinke ichat:gigicarlo
Luigi Rensinghoff wrote:
But be careful: Message Boxes dont save their state within subpatches so they have to be in the "parent" patch. And actually when PD crashes a
and then be also careful with the wording: "subpatches" (that's the [pd] objects!) are part of their "parent" patch aand therefore are saved as well when the parent patch is saved what you meant here is "abstractions" that will _not_ be saved when the containing patch is saved (which is good; just think of what happens when you have 2 instances of the same abstraction...)
fgmasdr IOhannes