Sorry, in my last message, I somehow forgot this, but here is the patch I was referring to :
#N canvas 0 0 324 453 loop.pd 1; #X floatatom 99 19 0; #X floatatom 23 207 1; #X msg 73 161 stop; #X msg 19 112 bang; #X obj 89 72 int 0; #X obj 84 120 ==; #X obj 83 139 select 0 1; #X obj 23 192 delay 500; #X obj 224 203 +; #X msg 99 0 bang; #X obj 12 22 moses 1; #X obj 222 239 outlet; #X obj 157 108 outlet; #X obj 12 1 inlet; #X connect 0 0 4 0; #X connect 1 0 8 0; #X connect 2 0 7 0; #X connect 3 0 7 0; #X connect 4 0 3 0; #X connect 4 0 8 1; #X connect 4 0 5 0; #X connect 4 0 12 0; #X connect 5 0 6 0; #X connect 6 1 2 0; #X connect 6 1 11 0; #X connect 7 0 1 0; #X connect 8 0 4 0; #X connect 9 0 0 0; #X connect 10 1 9 0; #X connect 10 1 5 1; #X connect 10 1 3 0; #X connect 13 0 10 0;
-- Larry Troxler -- lt@westnet.com -- Patterson, NY USA --
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@iem.mhsg.ac.at --- INSTITUT FUER ELEKTRONISCHE MUSIK- University of Music and Dramatic Art Tel. ++43-316-389-7210, Fax.++43-316-389-7008