Forums > MaxMSP

newbie question: 2 dimensional loop iteration

January 28, 2012 | 8:42 pm

Hello,
I’m just starting with Max and am having trouble doing a 2 dimensional iteration. What I want to accomplish in Max is this code:
for(i = 0; i < 8; i++){
for(j = 0; j < 8; j++){
print ( i , j )
}
}

I have a sketch of it in Max using "uzi" and "counter" but it is skipping some values. What am I doing wrong?
Cheers,

mrbook

– Pasted Max Patch, click to expand. –

January 28, 2012 | 9:56 pm

You’re close :)

– Pasted Max Patch, click to expand. –

January 28, 2012 | 9:57 pm

… and uhm, there might be much simpler ways of doing this, but I be tired and can’t think straight. :)



MIB
January 28, 2012 | 10:38 pm

maybe this?

– Pasted Max Patch, click to expand. –

January 28, 2012 | 10:43 pm

hehe, see? yeah, [uzi] is pretty much made for this for( loop thing precisely because of that rightmost outlet.


January 29, 2012 | 2:18 am

Great, thank you guys for the answers..


Viewing 6 posts - 1 through 6 (of 6 total)