Forums > MaxMSP

Just some advice… an easyer way to make this stuff.

August 26, 2007 | 1:55 am

Hello, I?m just trying to have an output of an object that brings my a list of numbers, and as I give to the input of that object one more number, that list grows up and sets the old numbers and the new one in left to right order… some thing like this:

I have: 44 33 28

Note in gives to me (in the input of that object): 88

So I have (in the output…): 44 33 28 88

Notein gives to me: 61

So I have: 44 33 28 88 61

-> I suppouse there must be an object that makes something like that, but I?m still in demo mode (less than a month on max) …I`m not able to find it. Any sugestions?. This is what I have done, but I am sure there must be some easyer way to make it possible.

max v2;
#N vpatcher 0 44 1148 720;
#P origin 6 0;
#P window setfont "Sans Serif" 9.;
#P number 1152 574 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 1090 574 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 1024 577 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 960 577 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 898 577 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 843 577 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 789 577 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 731 577 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 669 575 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 603 575 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 539 575 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 477 575 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 422 575 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 365 575 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 303 573 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 237 573 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 173 573 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 111 573 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 56 573 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 2 573 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P inlet 43 82 15 0;
#P window linecount 1;
#P message 43 168 178 196617 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#P newex 43 201 1139 196617 cycle 20;
#B color 5;
#P button 539 523 15 0;
#P user gswitch2 731 486 39 32 0 0;
#P user gswitch2 669 486 39 32 0 0;
#P user gswitch2 603 486 39 32 0 0;
#P user gswitch2 539 486 39 32 0 0;
#P user gswitch2 477 486 39 32 0 0;
#P user gswitch2 422 486 39 32 0 0;
#P button 477 523 15 0;
#P button 731 523 15 0;
#P button 669 523 15 0;
#P button 603 523 15 0;
#P button 422 523 15 0;
#P button 960 523 15 0;
#P user gswitch2 1152 486 39 32 0 0;
#P user gswitch2 1090 486 39 32 0 0;
#P user gswitch2 1024 486 39 32 0 0;
#P user gswitch2 960 486 39 32 0 0;
#P user gswitch2 898 486 39 32 1 0;
#P user gswitch2 843 486 39 32 0 0;
#P user gswitch2 789 486 39 32 0 0;
#P button 898 523 15 0;
#P button 1152 523 13 0;
#P button 1090 523 15 0;
#P button 1024 523 15 0;
#P button 843 523 15 0;
#P button 789 523 15 0;
#P number 1 299 29 9 0 0 8192 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 173 523 15 0;
#P user gswitch2 365 486 39 32 0 0;
#P user gswitch2 303 486 39 32 0 0;
#P user gswitch2 237 486 39 32 0 0;
#P user gswitch2 173 486 39 32 0 0;
#P user gswitch2 111 486 39 32 0 0;
#P user gswitch2 56 486 39 32 0 0;
#P user gswitch2 2 486 39 32 0 0;
#P button 111 523 15 0;
#P newex 2 608 1169 196617 pack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#B color 15;
#P button 365 523 15 0;
#P button 303 523 15 0;
#P button 237 523 15 0;
#P button 56 523 15 0;
#P button 2 524 15 0;
#P outlet 2 630 15 0;
#P window setfont "Snell Roundhand" 24.;
#P comment 87 74 586 583532568 There must be an easier way for to make this possible…;
#P fasten 46 0 17 0 48 153 6 153;
#P connect 44 19 9 0;
#P connect 9 0 2 0;
#P connect 2 0 47 0;
#P fasten 9 1 47 0 36 551 7 551;
#P connect 47 0 7 0;
#P connect 7 0 1 0;
#P fasten 17 0 9 1 6 403 36 403;
#P connect 46 0 45 0;
#P connect 45 0 44 0;
#P connect 44 18 10 0;
#P connect 10 0 3 0;
#P connect 3 0 48 0;
#P fasten 10 1 48 0 90 551 61 551;
#P connect 48 0 7 1;
#P fasten 17 0 10 1 6 402 90 402;
#P connect 44 17 11 0;
#P fasten 11 0 8 0 116 522 116 522;
#P connect 8 0 49 0;
#P fasten 11 1 49 0 145 552 116 552;
#P connect 49 0 7 2;
#P fasten 17 0 11 1 6 401 145 401;
#P connect 44 16 12 0;
#P fasten 12 0 16 0 178 523 178 523;
#P connect 16 0 50 0;
#P fasten 12 1 50 0 207 548 178 548;
#P connect 50 0 7 3;
#P fasten 17 0 12 1 6 397 207 397;
#P connect 44 15 13 0;
#P fasten 13 0 4 0 242 524 242 524;
#P connect 4 0 51 0;
#P fasten 13 1 51 0 271 554 242 554;
#P connect 51 0 7 4;
#P fasten 17 0 13 1 6 398 271 398;
#P connect 44 14 14 0;
#P fasten 14 0 5 0 308 526 308 526;
#P connect 5 0 52 0;
#P fasten 14 1 52 0 337 552 308 552;
#P connect 52 0 7 5;
#P fasten 17 0 14 1 6 399 337 399;
#P connect 44 13 15 0;
#P fasten 15 0 6 0 370 528 370 528;
#P connect 6 0 53 0;
#P fasten 15 1 53 0 399 552 370 552;
#P connect 53 0 7 6;
#P fasten 17 0 15 1 6 399 399 399;
#P connect 44 12 37 0;
#P fasten 37 0 32 0 427 522 427 522;
#P connect 32 0 54 0;
#P fasten 37 1 54 0 456 551 427 551;
#P connect 54 0 7 7;
#P fasten 17 0 37 1 6 397 456 397;
#P connect 44 11 38 0;
#P fasten 38 0 36 0 482 518 482 518;
#P connect 36 0 55 0;
#P fasten 38 1 55 0 511 548 482 548;
#P connect 55 0 7 8;
#P fasten 17 0 38 1 6 396 511 396;
#P connect 44 10 39 0;
#P fasten 39 0 43 0 544 519 544 519;
#P connect 43 0 56 0;
#P fasten 39 1 56 0 573 551 544 551;
#P connect 56 0 7 9;
#P fasten 17 0 39 1 6 395 573 395;
#P connect 44 9 40 0;
#P fasten 40 0 33 0 608 520 608 520;
#P connect 33 0 57 0;
#P fasten 40 1 57 0 637 550 608 550;
#P connect 57 0 7 10;
#P fasten 17 0 40 1 6 396 637 396;
#P connect 44 8 41 0;
#P fasten 41 0 34 0 674 522 674 522;
#P connect 34 0 58 0;
#P fasten 41 1 58 0 703 553 674 553;
#P connect 58 0 7 11;
#P fasten 17 0 41 1 6 397 703 397;
#P connect 44 7 42 0;
#P fasten 42 0 35 0 736 524 736 524;
#P connect 35 0 59 0;
#P fasten 42 1 59 0 765 553 736 553;
#P connect 59 0 7 12;
#P fasten 17 0 42 1 6 397 765 397;
#P connect 44 6 24 0;
#P fasten 24 0 18 0 794 515 794 515;
#P connect 18 0 60 0;
#P fasten 24 1 60 0 823 552 794 552;
#P connect 60 0 7 13;
#P fasten 17 0 24 1 6 393 823 393;
#P connect 44 5 25 0;
#P fasten 25 0 19 0 848 514 848 514;
#P connect 19 0 61 0;
#P fasten 25 1 61 0 877 548 848 548;
#P connect 61 0 7 14;
#P fasten 17 0 25 1 6 393 877 393;
#P connect 44 4 26 0;
#P fasten 26 0 23 0 903 513 903 513;
#P connect 23 0 62 0;
#P fasten 26 1 62 0 932 548 903 548;
#P connect 62 0 7 15;
#P fasten 17 0 26 1 6 392 932 392;
#P connect 44 3 27 0;
#P fasten 27 0 31 0 965 512 965 512;
#P connect 31 0 63 0;
#P fasten 27 1 63 0 994 547 965 547;
#P connect 63 0 7 16;
#P fasten 17 0 27 1 6 391 994 391;
#P connect 44 2 28 0;
#P fasten 28 0 20 0 1029 513 1029 513;
#P connect 20 0 64 0;
#P fasten 28 1 64 0 1058 550 1029 550;
#P connect 64 0 7 17;
#P fasten 17 0 28 1 6 391 1058 391;
#P connect 44 1 29 0;
#P fasten 29 0 21 0 1095 514 1095 514;
#P connect 21 0 65 0;
#P fasten 29 1 65 0 1124 552 1095 552;
#P connect 65 0 7 18;
#P fasten 17 0 29 1 6 392 1124 392;
#P connect 44 0 30 0;
#P fasten 30 0 22 0 1157 515 1157 515;
#P connect 22 0 66 0;
#P fasten 30 1 66 0 1186 556 1157 556;
#P connect 66 0 7 19;
#P fasten 17 0 30 1 6 393 1186 393;
#P pop;


August 26, 2007 | 2:28 am

[zl join] lets you combine 2 lists (or a list and one number).

zl is always the first to look at when working with lists, it can do almost everything.

but you can also use [prepend 88] in your particular case.
prepening a number to another number also makes them a list.


August 26, 2007 | 2:47 am

Hi.
As roman said, zl family objects are your friends ;)

#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P comment 258 240 130 9109513 reverse the list (for left-to-right order);
#P comment 258 204 156 9109513 joins the last stored list and add the new
number to it;
#P window linecount 1;
#P message 76 131 21 9109513 set;
#P button 76 105 15 0;
#P message 111 132 34 9109513 zlclear;
#P window linecount 0;
#P message 190 311 231 9109513;
#P window linecount 1;
#P newex 190 244 31 9109513 zl rev;
#P newex 190 274 57 9109513 prepend set;
#P newex 190 127 31 9109513 t i b;
#P newex 211 169 30 9109513 zl reg;
#P newex 190 207 31 9109513 zl join;
#P number 190 84 35 9 0 0 64 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 100 104 35 9109513 reset;
#P comment 258 172 130 9109513 stores a list;
#P connect 10 0 11 0;
#P connect 10 0 9 0;
#P connect 9 0 3 0;
#P lcolor 1;
#P connect 9 0 4 0;
#P lcolor 1;
#P connect 3 0 7 0;
#P fasten 3 0 4 1 195 233 248 233 248 154 236 154;
#P connect 2 0 5 0;
#P connect 5 0 3 0;
#P connect 7 0 6 0;
#P connect 11 0 8 0;
#P lcolor 1;
#P connect 6 0 8 0;
#P connect 5 1 4 0;
#P connect 4 0 3 1;
#P window clipboard copycount 14;



REC
August 26, 2007 | 4:29 am

> -> I suppouse there must be an object that makes something like that, but I?m still in demo mode (less than a month on max) ..
>
>

wow, i’m impressed only a month on max and you come up with a patch like that. my first month i was still reading tutorials not even knowing where to start with a patch. it’s been like 4 months and i just stated making patches that actually do something i want.

geez, matt


August 26, 2007 | 6:56 am

Thank you all, I hope this will work to me.

Of course upthere where I puted "notein" I meant "noteout".

…by the way, I?m taking at least 4 or 5 hours everyday to understend all this wonderfull shit (somedays it can be 10), and I must say that all the tutorials and the max interface and enviroment itself are very clear and intuitive. So good to make things without becoming a math-expert, thats gooood.

Thanks again.


August 26, 2007 | 11:14 am

> …by the way, I?m taking at least 4 or 5 hours everyday to understend all this wonderfull shit (somedays it can be 10), and I must say that all the tutorials and the max interface and enviroment itself are very clear and intuitive.

give this guy a free copy! :)


August 26, 2007 | 12:23 pm

Quote: gusanomaxlist wrote on Sat, 25 August 2007 20:47
—————————————————-
> Hi.
> As roman said, zl family objects are your friends ;)
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 2;
> #P comment 258 240 130 9109513 reverse the list (for left-to-right order);
> #P comment 258 204 156 9109513 joins the last stored list and add the new

…ETC.

Thanks a lot for this. It is exactly what I was looking for!!

…I know I have to be able to do it by my self, but help somedays is needed. Unless you whant to make things three times more complicated than what it can be!

Thank you.


August 26, 2007 | 7:03 pm

Maybe I’m missing something, but most simple way doing this is with the ‘append’ message-

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 27 69 55 196617 append $1;
#P number 27 39 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 0;
#P message 27 106 478 196617;
#P connect 2 0 0 0;
#P connect 1 0 2 0;
#P window clipboard copycount 3;

However, the zl object is still really good to know, and very flexible. I was kind of intimidated by zl when I first got into max, because of all the different modes. Now I use it all the time.


August 26, 2007 | 7:05 pm

oh… yes Roman mentioned prepend. I missed that on the first view. :()


August 27, 2007 | 11:07 am

Quote: Nick Inhofe wrote on Sun, 26 August 2007 13:03
—————————————————-
> Maybe I’m missing something, but most simple way doing this is with the ‘append’ message-
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P message 27 69 55 196617 append $1;
> #P number 27 39 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

ETC.

Ey guys… uaauhhh. I must say that we are the ones that have been a little bit missed. If we look up there in this window, and we watch at the sooooooo complicated ways to make this thing (the most complicated was mine, of course… but the one with the zl family wasn


August 27, 2007 | 12:21 pm

I was so happy bringing you to the almighty zl !
My apologies for that.
Best.


August 27, 2007 | 12:36 pm

Any way these days I have learned a lot about zl object. From now he is my friend!.

Some day I,ll be thankful of it, I am sure.

Best.


August 30, 2007 | 7:23 am

Nick Inhofe schrieb:
> oh… yes Roman mentioned prepend. I missed that on the first view. :()

But it needs two prepends, so your version wins hands down (though yours
would need a [t b l] to send out the list… ;-)

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 49 63 25 196617 set;
#P window linecount 0;
#P message 81 153 96 196617;
#P window linecount 1;
#P newex 81 121 62 196617 prepend set;
#P number 81 63 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 81 97 47 196617 prepend;
#P comment 34 64 16 196617 re;
#P connect 5 0 1 0;
#P hidden connect 5 0 4 0;
#P fasten 3 0 1 0 86 146 152 146 152 88 86 88;
#P connect 3 0 4 0;
#P connect 1 0 3 0;
#P connect 2 0 1 0;
#P window clipboard copycount 6;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


September 1, 2007 | 10:24 pm

what about bucket or spray?


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