Forums > MaxMSP

accum

April 1, 2007 | 1:48 pm


April 1, 2007 | 4:03 pm

>Hi listers,
>I wanted to use [accum] to perform a sum of successive numbers and I
>found a pretty strange result…
>Am I or accum wrong ?
>
>…this is not !!??;
> why is this working while…;

maybe some patch cords??? :-)

best

kasper

Kasper T. Toeplitz
noise, composition, bass, computer

http://www.sleazeArt.com

http://www.myspace.com/sleazeart


April 1, 2007 | 5:57 pm

At 3:48 PM +0200 4/1/07, raphael seguin wrote:
>Hi listers,
>I wanted to use [accum] to perform a sum of successive numbers and I found a pretty strange result…

If you’re talking about the right half of the patch, well, there are no patchcords. It will never work :-)

Assuming you’re just talking about the left side of the patch, the way you have it, accum does a running total of all the numbers it receives, while the + operator adds 0 to whatever number it has most recently received. Adding a feedback path (here in pink), makes + report the same as accum.

#P button 184 156 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 184 177 40 196617 t b b 0;
#P newex 199 215 40 196617 uzi 32;
#P newex 199 250 76 196617 random 8081;
#P number 143 412 67 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 266 291 27 196617 t i b;
#B color 5;
#P newex 266 352 27 196617 +;
#B color 5;
#P number 143 391 74 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 143 358 40 196617 accum;
#B color 5;
#P fasten 4 0 2 1 148 432 303 432 303 342 288 342;
#P lcolor 15;
#P fasten 7 2 0 0 219 211 148 211;
#P fasten 7 2 2 1 219 210 288 210;
#P lcolor 10;
#P connect 3 0 2 0;
#P connect 5 0 0 1;
#P connect 5 0 3 0;
#P connect 6 0 5 0;
#P connect 7 1 6 0;
#P connect 8 0 7 0;
#P fasten 2 0 4 0 271 409 148 409;
#P connect 0 0 1 0;
#P fasten 7 0 0 0 189 207 148 207;
#P window clipboard copycount 9;


Chris Muir | "There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue." – Brian Eno


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