hi
in order to create an abstraction with maximum flexibility, i'd like to realize it kind of dynamical, which means it uses arguments to create further abstractions in itself. this new abs also create new objects in theirself out of the arguments given from the 'parent' abstraction. to create objs dynamically, you send messages to 'pd-yourabs.pd'. the problem i have now is, i cannot adress different abs with different arguments but the same name. i can't figure out a way to solve this. is it impossible to send msgs to different windows with the same name? a $0-feature for abs-name would be nice......so an abstraction could at least send msgs to itself. other suggestions?
roman
Hallo, Roman Haefeli hat gesagt: // Roman Haefeli wrote:
in order to create an abstraction with maximum flexibility, i'd like to realize it kind of dynamical, which means it uses arguments to create further abstractions in itself. this new abs also create new objects in theirself out of the arguments given from the 'parent' abstraction. to create objs dynamically, you send messages to 'pd-yourabs.pd'. the problem i have now is, i cannot adress different abs with different arguments but the same name. i can't figure out a way to solve this. is it impossible to send msgs to different windows with the same name? a $0-feature for abs-name would be nice......so an abstraction could at least send msgs to itself. other suggestions?
I'm not sure, if I understand your problem, can you illustrate, what you want to do with some patches? I read it, that you want to have soemthing like [pd $0-name] for an abstraction [$0-abs], right? As nothing is known about $0 except that it is a number unique to an abstraction, you cannot use this unknown number in a filename in advance.
If you want to reuse abstractions, you have to handle the variable part inside of the abstraction's arguments. You can pass $0 in abstraction arguments, if that helps in your case.
Frank Barknecht _ ______footils.org__
sorry, it's like hieroglyphes what i wrote..... i try to get it a little bit more concrete: let's say i want to build an abstraction [multiosc~] which contains some osc~. let's say the first argument defines the number of [osc~], the second defines the frequency and the third defines the intervall to the frequencies of the following [osc~]. (so a [multiosc~ 4 1000 200] would give you four osc~ with the freqs: 1000, 1200, 1400 and 1600). i think the only way to do this, is to build a kind of 'self-creating' abs. it uses the arguments to create in itself a defined number of [osc~]. but if i make it 'self-creating', i only can use it oncce at the same time, which is not the idea of using an abs. when i create a second [mutliosc~], some new osc~ will be created also in the first [multiosc~] because both have the same window name. this is why i said, a $0-option for abs-names would be nice. has someone already done something like an 'self-creating' abstraction? or how would you realize something like [mutliosc~]?
p.s.: i'm not a c-programmer, but i think objs like [pack] or [route] are kind of 'self-creating' too (number of outlets is defined by number of arguments). i wouldn't know how to build them as an abstraction. but i think it should be possible to do somehting smilar in pd too.
----- Original Message ----- From: "Frank Barknecht" fbar@footils.org To: "post pd-msg" pd-list@iem.kug.ac.at Sent: Tuesday, December 14, 2004 2:23 AM Subject: Re: [PD] send messages to different abs with the same name
Hallo, Roman Haefeli hat gesagt: // Roman Haefeli wrote:
in order to create an abstraction with maximum flexibility, i'd like
to
realize it kind of dynamical, which means it uses arguments to
create
further abstractions in itself. this new abs also create new objects
in
theirself out of the arguments given from the 'parent' abstraction.
to
create objs dynamically, you send messages to 'pd-yourabs.pd'. the problem i have now is, i cannot adress different abs with different arguments but the same name. i can't figure out a way to solve this. is it impossible to send
msgs to
different windows with the same name? a $0-feature for abs-name
would be
nice......so an abstraction could at least send msgs to itself. other suggestions?
I'm not sure, if I understand your problem, can you illustrate, what you want to do with some patches? I read it, that you want to have soemthing like [pd $0-name] for an abstraction [$0-abs], right? As nothing is known about $0 except that it is a number unique to an abstraction, you cannot use this unknown number in a filename in advance.
If you want to reuse abstractions, you have to handle the variable part inside of the abstraction's arguments. You can pass $0 in abstraction arguments, if that helps in your case.
Ciao
Frank Barknecht _ ______footils.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management ->
Hallo, Roman Haefeli hat gesagt: // Roman Haefeli wrote:
sorry, it's like hieroglyphes what i wrote..... i try to get it a little bit more concrete: let's say i want to build an abstraction [multiosc~] which contains some osc~. let's say the first argument defines the number of [osc~], the second defines the frequency and the third defines the intervall to the frequencies of the following [osc~]. (so a [multiosc~ 4 1000 200] would give you four osc~ with the freqs: 1000, 1200, 1400 and 1600). i think the only way to do this, is to build a kind of 'self-creating' abs. it uses the arguments to create in itself a defined number of [osc~]. but if i make it 'self-creating', i only can use it oncce at the same time, which is not the idea of using an abs. when i create a second [mutliosc~], some new osc~ will be created also in the first [multiosc~] because both have the same window name. this is why i said, a $0-option for abs-names would be nice.
I think, you need to use named pages for this, that is: subpatches inside the abstractions. Attached are three files, which do this, multi-use.pd is the main patch.
Frank Barknecht _ ______footils.org__
yeah, frank. many thanks!!! i can solve my problem using [pd $0-name]. did'nt think about that. great! it's so simple. :)
roman
----- Original Message ----- From: "Frank Barknecht" fbar@footils.org To: "post pd-msg" pd-list@iem.kug.ac.at Sent: Tuesday, December 14, 2004 2:23 AM Subject: Re: [PD] send messages to different abs with the same name
Hallo, Roman Haefeli hat gesagt: // Roman Haefeli wrote:
in order to create an abstraction with maximum flexibility, i'd like
to
realize it kind of dynamical, which means it uses arguments to
create
further abstractions in itself. this new abs also create new objects
in
theirself out of the arguments given from the 'parent' abstraction.
to
create objs dynamically, you send messages to 'pd-yourabs.pd'. the problem i have now is, i cannot adress different abs with different arguments but the same name. i can't figure out a way to solve this. is it impossible to send
msgs to
different windows with the same name? a $0-feature for abs-name
would be
nice......so an abstraction could at least send msgs to itself. other suggestions?
I'm not sure, if I understand your problem, can you illustrate, what you want to do with some patches? I read it, that you want to have soemthing like [pd $0-name] for an abstraction [$0-abs], right? As nothing is known about $0 except that it is a number unique to an abstraction, you cannot use this unknown number in a filename in advance.
If you want to reuse abstractions, you have to handle the variable part inside of the abstraction's arguments. You can pass $0 in abstraction arguments, if that helps in your case.
Ciao
Frank Barknecht _ ______footils.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management ->