[PD] sssad key-name in abstractions (was: is $0 the same on every load?)

Damian Stewart damian at frey.co.nz
Wed Jul 23 10:38:14 CEST 2008


IOhannes m zmoelnig schreef:
>> hmm.. so what if i have for example a delay abstraction which a GOP 
>> gui, and i want to have multiple instances of this abstraction? i 
>> suppose i'd have to name each one individually, passing a name on 
>> initialisation?
>>
>> what if i have a delay abstraction inside a synth abstraction, and i 
>> want two instances of the synth abstraction? then i have two instances 
>> of the delay abstraction but no easy way to name them without messily 
>> chaining up the name strings...
> 
> hmm, the subject suggests this is about $0, so i am not sure whether i 
> fully understand your question (or what you are missing): just use 
> "$0-mydel".
> that $0 is not 1026 shouldn't be a problem for you either.

have changed the subject line to something better ;-)

my understanding of sssad is that it requires data be given unique key 
names. the question is how to generate these unique key names within 
multiple instances of abstractions. the original discussion was about 
using $0 to do this, which doesn't seem possible. in your example if i 
save a bunch of states with eg mydelay-$0-delaytime when $0 is 1026, 
then go and try to load these up some other time, then $0 is not 
guaranteed to be 1026.

i suppose the solution is to have a delay that takes an instance name 
argument, eg [mydelay left], then use that instance name in the sssad 
key, eg mydelay-$1-delaytime, which will create mydelay-left-delaytime 
for [mydelay left]. but then the problem remains - if i have a synth 
that has built-in delay [mydelay left], and i want to have two 
abstractions of this synth, i'm going to end up with two sets of keys 
mydelay-left-delaytime. so i need some kind of chained name thing, eg 
[mysynth squelchy] instantiates [mysynth $1-left], so the sssad key will 
be mydelay-squelchy-left-delaytime.

chaining through multiple levels of abstraction like this (which i tend 
to do when i'm building patches) is going to lead to keynames like 
mylpf-squelchy-left-sawtooth-lfo-pre-cutoff, for the cutoff frequency of 
an lfo pre-filter inside the sawtooth generator for the left channel of 
the 'squelchy' synth. which i suppose isn't a problem, really, it's just 
a bit messy.




More information about the Pd-list mailing list