Oops, I forget to include the loop.pd abstraction!

Winfried Ritsch ritsch at iem.mhsg.ac.at
Wed Mar 18 20:23:52 CET 1998


Hello,

[...]
 > 
 > First, the abstraction pasted below, seems to always come up with the
 > second floatatom initialized to 0 instead of 1 (which it was set to when
 > the abstraction was saved, and is indeed the value saved in the source
 > code). By this, I mean, that when I create an object called "loop" (the
 > name of the file is "loop.pd", an object is created with the correct
 > number of inlets and outlets, and if I click on this object, the correct
 > subpatch is brought up; however, the number object in the subpatch shows
 > up as "0" instead of "1". The behavior of the abstraction is also
 > consistent with this error. bAny ideas? Is this a known bug? (I'm at the
 > 0.21 level).
 > 
[...]

#X floatatom 23 207 1;
 is a nuber box, which is indeed never initialized, to initialize this
you have to do: (also in ircam max)

 *----------
 |loadbang |     #X obj 25 20 loadbang;
 *----------
 |               #X connect 0 0 1 0;
 *----
 |1  (			  #X msg 25 40 1;
 *----
 |               #X connect 1 0 2 0;
 *-----
 |0    \         #X floatatom 25 60 0;
 *------

or if you dont want to change the value just the message



 >[...]
 > Second, all I am trying to do is to implement a looping mechanism - an
 > object that counts from x to y, transmitting the integers from x to y
 > consecutively on its outlet.!! 
 > I have a feeling there has to be an easier way!
 > 
 >[...]
 
Here my solution: but maybe not best:

--- snip ---
#N canvas 243 201 285 219 zaehlen.pd 1;
#X obj 181 31 inlet;
#X obj 138 30 inlet;
#X floatatom 53 130 5;
#X obj 53 88 int;
#X obj 23 89 +;
#X msg 23 67 1;
#X msg 96 72 stop;
#X obj 53 109 t i b;
#X obj 21 32 inlet;
#X text 21 11 from and trigger;
#X text 142 11 to;
#X text 186 11 time;
#X obj 51 153 outlet;
#X obj 89 90 delay \$2;
#X text 33 173 usage: zaehlen <from> <deltatime>;
#X obj 89 52 moses \$1;
#X connect 0 0 13 1;
#X connect 1 0 15 1;
#X connect 2 0 12 0;
#X connect 3 0 4 1;
#X connect 3 0 7 0;
#X connect 4 0 3 0;
#X connect 5 0 4 0;
#X connect 6 0 13 0;
#X connect 7 0 2 0;
#X connect 7 0 15 0;
#X connect 7 1 13 0;
#X connect 8 0 3 0;
#X connect 13 0 5 0;
#X connect 15 1 6 0;
--- snip ---

mfg winfried


--- DI Winfried Ritsch - ritsch at iem.mhsg.ac.at ---
 INSTITUT FUER ELEKTRONISCHE MUSIK-
 University of Music and Dramatic Art
 Tel. ++43-316-389-7210, Fax.++43-316-389-7008



More information about the Pd-list mailing list