Forums > MaxMSP

breakpoints controller

October 2, 2007 | 6:44 pm

Hi, I was asking myself it is possible to controller every breakpoint of a envelope. I tryed to do this with funnel, but no way..

max v2;
#N vpatcher 10 59 610 459;
#P window setfont "Sans Serif" 9.;
#P number 317 117 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user uslider 317 72 25 25 20 1 0 0;
#P number 277 117 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user uslider 277 72 25 25 20 1 0 0;
#P user function 237 231 437 331 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 1. 0. 0;
#X add 1000. 1. 0;
#X add 138.297867 0.706667 0;
#X add 239.361694 0.293333 0;
#X add 441.489349 0.106667 0;
#X add 590.425537 0.12 0;
#X add 936.170166 0. 0;
#X domain 1000.;
#X range 0. 1.;
#X done;
#P window linecount 1;
#P newex 152 146 180 196617 funnel 5;
#B color 5;
#P message 91 216 61 196617 1 0;
#P number 236 117 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 194 118 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 152 118 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user uslider 152 73 25 25 20 1 0 0;
#P user uslider 194 73 25 25 20 1 0 0;
#P user uslider 236 72 25 25 20 1 0 0;
#P message 91 176 54 196617 set $1 $2;
#P connect 8 0 0 0;
#P connect 0 0 7 0;
#P connect 3 0 4 0;
#P connect 4 0 8 0;
#P connect 2 0 5 0;
#P connect 5 0 8 1;
#P connect 1 0 6 0;
#P connect 6 0 8 2;
#P connect 0 0 9 0;
#P connect 10 0 11 0;
#P connect 11 0 8 3;
#P connect 12 0 13 0;
#P connect 13 0 8 4;
#P pop;


October 2, 2007 | 7:11 pm

You are just trying to move the breakpoints up and down with the sliders? You have two mistakes: you should be converting the slider values to float values in the range 0. – 1. (or whatever the range of the breakpoint function object happens to be), and to set a particular point the documentation says you need to pass in three numbers: index x y.

So something like the patch below might be what you are looking for. You may want to look into using a multislider instead of a bunch of separate sliders.

#P user uslider 538 47 26 73 128 1 0 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 538 175 72 196617 prepend 1000;
#P newex 538 149 40 196617 / 127.;
#P user uslider 458 48 26 73 128 1 0 0;
#P newex 458 175 66 196617 prepend 800;
#P newex 458 150 40 196617 / 127.;
#P user uslider 379 49 26 73 128 1 0 0;
#P newex 379 176 66 196617 prepend 600;
#P newex 379 151 40 196617 / 127.;
#P user uslider 300 50 26 73 128 1 0 0;
#P newex 300 177 66 196617 prepend 400;
#P newex 300 152 40 196617 / 127.;
#P user uslider 221 51 26 73 128 1 0 0;
#P newex 221 178 66 196617 prepend 200;
#P newex 221 153 40 196617 / 127.;
#P user uslider 142 52 26 73 128 1 0 0;
#P newex 302 284 79 196617 funnel 6;
#P newex 142 179 54 196617 prepend 0;
#P newex 142 154 40 196617 / 127.;
#P user function 222 319 422 419 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 0. 0. 0;
#X add 200. 0.433071 0;
#X add 400. 0.614173 0;
#X add 600. 0.606299 0;
#X add 800. 0.322835 0;
#X add 1000. 0. 0;
#X domain 1000.;
#X range 0. 1.;
#X done;
#P connect 18 0 3 5;
#P connect 17 0 18 0;
#P connect 19 0 17 0;
#P connect 3 0 0 0;
#P connect 2 0 3 0;
#P connect 6 0 3 1;
#P connect 9 0 3 2;
#P connect 12 0 3 3;
#P connect 15 0 3 4;
#P connect 14 0 15 0;
#P connect 11 0 12 0;
#P connect 8 0 9 0;
#P connect 5 0 6 0;
#P connect 16 0 14 0;
#P connect 13 0 11 0;
#P connect 10 0 8 0;
#P connect 7 0 5 0;
#P connect 1 0 2 0;
#P connect 4 0 1 0;
#P window clipboard copycount 20;


October 2, 2007 | 8:43 pm

exactly!! thats it :)

many thanks,


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