Forums > MaxMSP

ADSR Envelope

December 15, 2006 | 11:48 am

Hi, ive created an ADSR envelope using function, i want to be able to change the x any co ordinates for each A, D, S, R, how can i do this using, sliders or dials?
Thanks,.

max v2;
#N vpatcher 10 59 610 459;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 67 154 85 196617 1000. 0.;
#P message 66 131 103 196617 803.190979 0.493;
#P message 65 109 79 196617 505.319 0.507;
#P message 63 84 79 196617 313.83 0.787;
#P message 60 60 80 196617 0. 0.;
#P button 389 283 15 0;
#P message 304 136 68 196617 clickmove $1;
#P toggle 304 114 15 0;
#P toggle 238 114 15 0;
#P message 238 136 59 196617 clickadd $1;
#P message 200 115 32 196617 clear;
#P user function 200 169 400 269 1 1 0 0;
#X frgb 255 92 174;
#X brgb 231 243 248;
#X rgb2 255 25 214;
#X rgb3 248 255 25;
#X rgb4 0 248 80;
#X rgb5 0 0 0;
#X add 0. 0. 0;
#X add 313.83 0.787 0;
#X add 505.319 0.507 0;
#X add 803.190979 0.493 0;
#X add 1000. 0. 0;
#X domain 1000.;
#X range 0. 1.;
#X done;
#P fasten 5 0 0 0 309 160 205 160;
#P fasten 2 0 0 0 243 160 205 160;
#P fasten 1 0 0 0 205 150 205 150;
#P fasten 7 0 0 0 65 78 205 78;
#P fasten 8 0 0 0 68 103 205 103;
#P fasten 9 0 0 0 70 126 205 126;
#P fasten 10 0 0 0 71 151 205 151;
#P connect 11 0 0 0;
#P connect 3 0 2 0;
#P connect 4 0 5 0;
#P connect 0 3 6 0;
#P pop;


December 16, 2006 | 3:21 am

here’s a dirty start:

#P window setfont "Sans Serif" 9.;
#P number 555 288 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 592 288 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 531 316 58 196617 pak 4 0. 0.;
#P number 466 288 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 503 288 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 442 316 58 196617 pak 3 0. 0.;
#P number 386 288 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 423 288 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 362 316 58 196617 pak 2 0. 0.;
#P number 310 288 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 347 288 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 286 316 58 196617 pak 1 0. 0.;
#P message 153 418 85 196617 1000. 0.;
#P message 152 395 103 196617 803.190979 0.493;
#P message 151 373 79 196617 505.319 0.507;
#P message 149 348 79 196617 313.83 0.787;
#P message 146 324 80 196617 0. 0.;
#P button 475 547 15 0;
#P message 390 400 68 196617 clickmove $1;
#P toggle 390 378 15 0;
#P toggle 324 378 15 0;
#P message 324 400 59 196617 clickadd $1;
#P message 286 379 32 196617 clear;
#P user function 286 433 486 533 1 1 0 0;
#X frgb 255 92 174;
#X brgb 231 243 248;
#X rgb2 255 25 214;
#X rgb3 248 255 25;
#X rgb4 0 248 80;
#X rgb5 0 0 0;
#X add 0. 0. 0;
#X add 113. 0.41 0;
#X add 276.595734 0.92 0;
#X add 691.489319 0.453333 0;
#X add 1000. 0. 0;
#X domain 1000.;
#X range 0. 1.;
#X done;
#P fasten 21 0 0 0 536 351 291 351;
#P fasten 18 0 0 0 447 351 291 351;
#P fasten 15 0 0 0 367 351 291 351;
#P connect 12 0 0 0;
#P connect 11 0 0 0;
#P fasten 10 0 0 0 157 415 291 415;
#P fasten 9 0 0 0 156 390 291 390;
#P fasten 8 0 0 0 154 367 291 367;
#P fasten 7 0 0 0 151 342 291 342;
#P fasten 1 0 0 0 291 414 291 414;
#P fasten 2 0 0 0 329 424 291 424;
#P fasten 5 0 0 0 395 424 291 424;
#P connect 14 0 12 1;
#P connect 3 0 2 0;
#P connect 13 0 12 2;
#P connect 17 0 15 1;
#P connect 4 0 5 0;
#P connect 16 0 15 2;
#P connect 20 0 18 1;
#P connect 0 3 6 0;
#P connect 19 0 18 2;
#P connect 23 0 21 1;
#P connect 22 0 21 2;

On 12/15/06, John wrote:
>
> Hi, ive created an ADSR envelope using function, i want to be able to change the x any co ordinates for each A, D, S, R, how can i do this using, sliders or dials?
> Thanks,.
>
>
> max v2;
> #N vpatcher 10 59 610 459;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P message 67 154 85 196617 1000. 0.;
> #P message 66 131 103 196617 803.190979 0.493;
> #P message 65 109 79 196617 505.319 0.507;
> #P message 63 84 79 196617 313.83 0.787;
> #P message 60 60 80 196617 0. 0.;
> #P button 389 283 15 0;
> #P message 304 136 68 196617 clickmove $1;
> #P toggle 304 114 15 0;
> #P toggle 238 114 15 0;
> #P message 238 136 59 196617 clickadd $1;
> #P message 200 115 32 196617 clear;
> #P user function 200 169 400 269 1 1 0 0;
> #X frgb 255 92 174;
> #X brgb 231 243 248;
> #X rgb2 255 25 214;
> #X rgb3 248 255 25;
> #X rgb4 0 248 80;
> #X rgb5 0 0 0;
> #X add 0. 0. 0;
> #X add 313.83 0.787 0;
> #X add 505.319 0.507 0;
> #X add 803.190979 0.493 0;
> #X add 1000. 0. 0;
> #X domain 1000.;
> #X range 0. 1.;
> #X done;
> #P fasten 5 0 0 0 309 160 205 160;
> #P fasten 2 0 0 0 243 160 205 160;
> #P fasten 1 0 0 0 205 150 205 150;
> #P fasten 7 0 0 0 65 78 205 78;
> #P fasten 8 0 0 0 68 103 205 103;
> #P fasten 9 0 0 0 70 126 205 126;
> #P fasten 10 0 0 0 71 151 205 151;
> #P connect 11 0 0 0;
> #P connect 3 0 2 0;
> #P connect 4 0 5 0;
> #P connect 0 3 6 0;
> #P pop;
>
>


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