[PD] Abstraction [define]

Cesare Marilungo cesare at poeticstudios.com
Sun Dec 17 12:53:10 CET 2006


Frank Barknecht wrote:
> Hallo,
> Cesare Marilungo hat gesagt: // Cesare Marilungo wrote:
>
>   
>> I don't want to sound pretentious. But i think that there's an easy 
>> answer: save *everything* as a default behavior. I should load a patch 
>> and have the very same situation I had when I saved it.
>>     
>
> It sounds simple and simple always is good, but not this time. To take
> one example why not: Suppose you use an abstraction in two different
> patches. Saving the state of this abstraction in one patch will
> overwrite a saved state of the same abstraction as used in another
> patch.
No. Because the state is saved in the patch which use the abstraction. 
The abstraction itself is another patch and when you open it or create 
an object with it you get the state in which the abstraction was saved 
as a standalone patch. There's no ambiguity.
>  Or even in the same patch, if you use the same abstracion twice
> in the same patch: Which state of the two abstraction instances is the
> right one?
Same as above. Think about the behavior of a Graph On Parent.
> And how dare you overwrite the state, the original
> abstraction author has saved in the first place? ;)
>   
This approach would do no harm to your abstractions :-P  When I load 
them in my patch I have the default state that you (the author of the 
abstraction) saved. If I tweak some parameters I'm sure that they'll be 
saved with my own patch.
> There are more reasons why saving only snapshots isn't The Right Thing
> for everything. Some values may change during a patch's runtime but
> you may want to save a default value from the past instead. With some
> kinds of patches even the patch's contents may change e.g if you use
> nqpoly4 etc.
>   
I haven't studied nqpoly4 inner workings but it allocates the 
abstractions dinamically (even if it does it just once, when you create 
the object). You need to control the abstractions from the ouside anyways.
> Snapshot-saving can be useful, of course. Max' "preset" object is in
> use for years and it does exactly that. But even Max got a new state
> saving mechanism in recent versions which is actually remarkably
> similar to the approach of Memento, netpd and sssad.
>
> Ciao
>   
I see. But, especially for beginners, saving the patch as a snapshot 
would be great. You would be able to handle the exceptions with a 
loadbang. This is the most intuitive behaviour, IMO.

Anyway, now that I'm thinking about it, Pd already does most of this. 
Sliders and such already act in this way (but having the 'init' property 
on by default would be an improvment, so if I forget to turn it on 
there's no risk I loose that setting). There was a problem I've 
encountered once with a GOP inside another but I don't remember exactly 
what it was.

c.

-- 
http://www.cesaremarilungo.com





More information about the Pd-list mailing list