Forums > MaxMSP

Stack overflow in a crude feedback object. Help?!

June 14, 2007 | 3:31 am

Hey guys I have been having some difficulty with some stack overflow issues apparent in the patchers.

What I am basically trying to create is a device that creates multiple layers of feedback through the keyboard.

Here is the text for the max patch.

max v2;
#N vpatcher 183 170 783 570;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 446 44 1126 544;
#P window setfont "Sans Serif" 9.;
#P newex 121 470 43 196617 noteout;
#P newex 105 430 88 196617 makenote 58 150;
#P button 104 339 15 0;
#P button 176 278 15 0;
#P newex 124 309 29 196617 gate;
#P newex 90 384 54 196617 pack 0 58;
#P window linecount 1;
#P newex 182 234 27 196617 < 0;
#P number 140 197 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 111 234 49 196617 pipe 500;
#P newex 239 215 27 196617 -18;
#P newex 141 175 27 196617 -4;
#P number 80 156 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 141 143 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 0;
#P newex 234 160 166 196617 line;
#P message 229 115 74 196617 50 , 600 1500;
#P button 231 74 15 0;
#P newex 124 96 51 196617 stripnote;
#P newex 126 41 89 196617 notein;
#P connect 1 0 6 0;
#P connect 15 0 12 0;
#P connect 6 0 12 0;
#P connect 13 0 15 0;
#P connect 12 0 16 0;
#P connect 10 0 9 0;
#P connect 16 0 17 0;
#P connect 0 0 1 0;
#P connect 14 0 13 0;
#P connect 13 0 12 1;
#P connect 7 0 10 0;
#P connect 1 1 5 0;
#P fasten 13 0 7 0 129 361 220 361 220 166 146 166;
#P connect 5 0 7 0;
#P connect 9 0 13 1;
#P connect 4 0 9 1;
#P connect 16 1 17 2;
#P connect 0 1 1 1;
#P connect 11 0 14 0;
#P connect 10 0 11 0;
#P connect 8 0 16 2;
#P connect 2 0 3 0;
#P connect 0 0 2 0;
#P connect 3 0 4 0;
#P connect 4 0 8 0;
#P pop;
#P newobj 222 109 100 196617 p feedback module 2;
#P button 100 61 15 0;
#N vpatcher 63 49 462 488;
#P origin 182 144;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P message 92 133 33 196617 clear;
#P outlet 114 443 15 0;
#P inlet 111 -102 15 0;
#P window linecount 1;
#P newex 116 383 43 196617 noteout;
#P newex 282 182 27 196617 -20;
#P newex 104 327 88 196617 makenote 80 229;
#P button 88 239 15 0;
#P newex 70 283 54 196617 pack 0 80;
#P newex 115 210 29 196617 gate;
#P newex 130 157 49 196617 pipe 300;
#P toggle 186 186 15 0;
#P newex 195 158 27 196617 > 0;
#P number 151 114 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 152 86 32 196617 -1;
#P newex 261 84 123 196617 line;
#P message 261 54 74 196617 25 , 300 1000;
#P button 262 17 15 0;
#P number 152 50 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 42 44 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 111 -2 93 196617 stripnote;
#P newex 109 -75 182 196617 notein;
#P connect 1 0 2 0;
#P connect 2 0 13 0;
#P connect 14 0 13 0;
#P connect 12 0 14 0;
#P connect 13 0 15 0;
#P connect 18 0 0 0;
#P connect 0 0 1 0;
#P connect 12 0 13 1;
#P connect 10 0 12 0;
#P connect 15 0 17 0;
#P connect 8 0 11 0;
#P connect 20 0 11 0;
#P connect 15 1 17 1;
#P connect 11 0 12 1;
#P connect 7 0 8 0;
#P connect 1 1 3 0;
#P fasten 12 0 7 0 120 236 248 239 243 73 158 70;
#P connect 3 0 7 0;
#P connect 6 0 11 1;
#P connect 16 0 15 2;
#P connect 9 0 10 0;
#P connect 0 1 1 1;
#P connect 8 0 9 0;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P connect 0 0 4 0;
#P connect 6 0 16 0;
#P pop;
#P newobj 98 106 91 196617 p feedback module;
#P connect 1 0 0 0;
#P pop;


June 14, 2007 | 6:39 am

In the second module the gate is controlled with a bang, that should be a toggle. Anyhow, pipe allows you to store multiple numbers at once, it would be probably easier to feed it a list of pitch-velocity-delay and decrease for each step the velocity and increase delay with a multiplying factor for instance. A fourth number could be included that functions as counter, and provides an end statement. In this way the patch will be polyphonic.

_
johan


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