Forums > MaxMSP

Number stack

December 16, 2007 | 8:19 pm

Is there any object or way for me to create a FIFO number stack?
I need to be able to store several (integer) numbers then output them one at
a time using a bang, but I need to know that the first number I’ve put in
will definitely come out with the first bang, second number with the second
bang etc…

Any help you can give me would be great!

Cheers

Joe


December 16, 2007 | 8:27 pm


December 16, 2007 | 9:18 pm

At 8:19 PM +0000 12/16/07, Joe Bicker wrote:
>Is there any object or way for me to create a FIFO number stack?

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P hidden comment 0 263 60 196617 bottom left;
#P window setfont "Sans Serif" 12.;
#P comment 61 11 129 196620 A simple FIFO queue;
#P window setfont "Sans Serif" 9.;
#P comment 277 241 23 196617 End;
#P newex 261 190 32 196617 sel 1;
#P comment 167 240 54 196617 Queue Out;
#N comlet End;
#P outlet 261 240 15 0;
#P newex 32 164 97 196617 pack i i;
#P newex 219 188 30 196617 grab;
#P comment 49 56 47 196617 Queue in;
#P comment 343 56 30 196617 Reset;
#P button 325 77 15 0;
#P message 325 95 14 196617 0;
#N comlet Queue Out;
#P outlet 219 240 15 0;
#P button 219 80 15 0;
#N counter 0 999;
#X flags 0 0;
#P newobj 219 160 74 196617 counter 0 999;
#N comlet next;
#P inlet 219 56 15 0;
#N counter 0 999;
#X flags 0 0;
#P newobj 32 122 74 196617 counter 0 999;
#N coll ;
#P newobj 32 219 53 196617 coll;
#P newex 32 94 97 196617 t b i;
#N comlet Reset;
#P inlet 325 56 15 0;
#N comlet Queue in;
#P inlet 32 56 15 0;
#P comment 236 56 30 196617 next;
#P window setfont "Sans Serif" 18.;
#P comment 0 5 65 196626 Queue;
#P window setfont "Sans Serif" 9.;
#P comment 190 12 72 196617 by Chris Muir;
#P fasten 12 0 7 2 330 117 69 117;
#P fasten 12 0 9 2 330 117 256 117;
#P connect 7 0 17 0;
#P fasten 7 0 9 4 37 152 288 152;
#P connect 3 0 5 0;
#P connect 5 0 7 0;
#P fasten 16 1 6 0 244 211 37 211;
#P connect 17 0 6 0;
#P connect 5 1 17 1;
#P connect 8 0 10 0;
#P connect 10 0 9 0;
#P connect 9 0 16 0;
#P connect 16 0 11 0;
#P connect 9 2 20 0;
#P connect 20 0 18 0;
#P connect 4 0 13 0;
#P connect 13 0 12 0;
#P window clipboard copycount 24;


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)