[PD] send messages to different abs with the same name

Frank Barknecht fbar at footils.org
Tue Dec 14 11:46:51 CET 2004


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.

Ciao
-- 
 Frank Barknecht                               _ ______footils.org__
-------------- next part --------------
#N canvas 0 0 450 300 10;
#X obj 93 130 osc~ \$1;
#X obj 93 170 outlet~;
#X obj 92 102 inlet;
#X connect 0 0 1 0;
#X connect 2 0 0 0;
-------------- next part --------------
#N canvas 186 124 506 474 10;
#N canvas 0 0 450 300 1004-scratch 0;
#X restore 287 86 pd \$0-scratch;
#X obj 169 202 makefilename pd-%d-scratch;
#X obj 169 177 f \$0;
#X obj 167 34 loadbang;
#X msg 231 160 bang;
#X obj 90 104 f \$1;
#X obj 125 106 f \$2;
#X obj 104 271 pack 0 0 s;
#X msg 104 330 \; \$3 obj 10 \$2 myosc~ \$1;
#X obj 84 202 t f b;
#X obj 110 236 f 10;
#X obj 144 236 + 30;
#X obj 167 68 t b b b b;
#X obj 160 106 f \$3;
#X connect 1 0 7 2;
#X connect 2 0 1 0;
#X connect 3 0 12 0;
#X connect 4 0 2 0;
#X connect 5 0 9 0;
#X connect 6 0 9 0;
#X connect 7 0 8 0;
#X connect 9 0 7 0;
#X connect 9 1 10 0;
#X connect 10 0 11 0;
#X connect 10 0 7 1;
#X connect 11 0 10 1;
#X connect 12 0 5 0;
#X connect 12 1 6 0;
#X connect 12 2 13 0;
#X connect 12 3 2 0;
#X connect 13 0 9 0;
-------------- next part --------------
#N canvas 0 0 450 300 10;
#X obj 142 142 multiosc~ 300 400 500;
#X obj 137 184 multiosc~ 600 700 800;
#X obj 141 220 multiosc~ 440 880 1660;


More information about the Pd-list mailing list