This is actually two questions disguised as one :-)
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).
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!
Larry
-- Larry Troxler -- lt@westnet.com -- Patterson, NY USA --
Larry Troxler wrote:
<snip> > 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 <snip>
When I last tried this, (about at .20) it was a problem for me to. I found that the arguments only worked in message boxes (not in objects). So, I would put the argument into a message box and use the equivalent of a loadbang to set the object. I mentioned it to Miller when I was doing pushit, but there were so many other problems that it probably got lost in the confusion.
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!
I can think of a couple of ways. One, you can use the traditional "counter" trick with a '+ 1' object looped back onto itself with an int. Or, you can use the counter object in MarkEx. With the trick above, it should work fine.
Later, Mark
Hello,
with route in max, strings like start, stop, reset .... could be routed with route, but in pd it says
error: route: no method for 'start' ...
is this intended or will it be implemented in future ?
(just asking, because of porting patches from max to pd)
--- Here the patch:
*------ *------
|start \ |stop
*------- *-------
| ________/
|/
*------------------
|route start stop |
*---------*-------*
| |
*-------- *--------
|print a| |print b|
or
#N canvas 131 152 600 498 8; #X obj 53 88 route start stop; #X msg 50 50 start; #X msg 106 51 stop; #X obj 23 121 print a; #X obj 103 120 print b; #X connect 0 0 3 0; #X connect 0 1 4 0; #X connect 1 0 0 0; #X connect 2 0 0 0;
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
Mark Danks wrote: [....]
I can think of a couple of ways. One, you can use the traditional "counter" trick with a '+ 1' object looped back onto itself with an int. Or, you can use the counter object in MarkEx. With the trick above, it should work fine.
Later, Mark
Probably my problem wasn't stated clearly. From a quick look at your counter, it appears as though it is a counter that increments once per bang. However, what I was looking for is something that will in one shot, send out a range of numbers, something like a "for" loop in C.
The use for this would be, for example, to set up values in arrays.
Larry
-- Larry Troxler -- lt@westnet.com -- Patterson, NY USA --
You can still use a counter, just send a bunch of bangs at once.
Or, a more complex thing...
Use line. Make sure that the resolution is enough to hit each int. Run the output of the line into an int box (to truncate it). Send the output of the int box into change. A bit more complex, but should do it.
However, it would be trivial to write this object. I'll try to do it tonight. It will have a start point, an end point, and an increment. Every time you send it a bang, it will send out a whole slew of numbers.
Is there an object like this in Opcode Max? If so, I'll use the same name.
Later, Mark
Okay, here is the patch to do the spew trick. I might write the external anyways, but this should do the trick. Just fill in the numbers and try not to get a stack overflow.
Later, Mark
#N canvas 196 294 600 500 8; #X obj 177 217 + 1; #X obj 170 155 t i i; #X obj 236 225 spigot; #X obj 222 264 < 20; #X obj 164 255 t i i; #X obj 165 324 print; #X msg 197 188 1; #X msg 150 188 0; #X msg 164 105 bang; #X connect 0 0 4 0; #X connect 1 0 7 0; #X connect 1 1 6 0; #X connect 2 0 0 0; #X connect 3 0 2 1; #X connect 4 0 2 0; #X connect 4 0 5 0; #X connect 4 1 3 0; #X connect 6 0 0 1; #X connect 7 0 0 0; #X connect 8 0 1 0;