[PD] Dynamically instantiating arrays

Frank Barknecht fbar at footils.org
Fri Jan 2 00:00:24 CET 2004


Hallo,
Dan Wilken hat gesagt: // Dan Wilken wrote:

> How can I dynamically create counting arrays?
> 
> I've got a counter stepping a [makefilename sound%d] going to a [set 
> $1] going into a [tabwrite~] object and I think this is all working, 
> except now I need to dynamically create the arrays sound1, sound2, 
> sound3, etc.

Is what the attached patch what you want?

> Also, I'm hoping to pump this up to about 200 tracks, once recorded 
> they playback continuously. I've created separate, static programs to 
> do this, and have run thirty simultaneously with good results. BIG 
> hickups when opening files (a bug? 

Well, but a known one and hard to get rid off. File system operations
by nature are not realtime safe. You could use readsf~ or writesf~
which have precautions against hickups.

> PD 3.6 on 10.2.8), but other than that, very clean sound. Do I need
> to manage voices, or is that only for midi? I don't understand the
> voices concept within PD, and haven't found how many PD can support.
> Where's a good conceptual discussion of PD and Voices.

See the [poly] help patch. Pd doesn't really know "voices" it is
monophonic by nature. If you need polyphony you will have to create as
many signal generators as needed. Some externals like dyn~ make this
easier.

ciao
-- 
 Frank Barknecht                               _ ______footils.org__
-------------- next part --------------
#N canvas 418 483 450 300 10;
#N canvas 680 198 450 300 scratchpad 1;
#X restore 302 48 pd scratchpad;
#X msg 67 239 \; pd-scratchpad obj 115 \$2 table \$1;
#X obj 68 219 pack s f;
#X obj 137 181 * 20;
#X obj 69 198 makefilename sound%d;
#X obj 69 174 t f f;
#X msg 155 96 \; pd-scratchpad clear \;;
#X obj 69 144 i 0;
#X obj 98 144 + 1;
#X msg 117 107 0;
#X obj 58 114 until;
#X obj 57 77 t f b b;
#X floatatom 56 59 5 0 0 1 How_many_arrays? - -;
#X msg 56 34 30;
#X connect 2 0 1 0;
#X connect 3 0 2 1;
#X connect 4 0 2 0;
#X connect 5 0 4 0;
#X connect 5 1 3 0;
#X connect 7 0 8 0;
#X connect 7 0 5 0;
#X connect 8 0 7 1;
#X connect 9 0 7 1;
#X connect 10 0 7 0;
#X connect 11 0 10 0;
#X connect 11 1 9 0;
#X connect 11 2 6 0;
#X connect 12 0 11 0;
#X connect 13 0 12 0;


More information about the Pd-list mailing list