Forums > MaxMSP

adsr on audio

November 15, 2009 | 4:04 pm

i have tried asking for this before, no luck . i am trying to re prashe the question.

this might scare you people off, it did on harmony central forum. the question is so simple, I might be stupid not to be able to work it out for my self. but i am a max msp virgin and pointers and help is sometimes the best option when it comes to getting further up the road in programming. i have read tutorials and searched for tutorials on the subject (i might have searched for the wrong ones), when that is said here goes :

my patch is a step sequencer which starts of with a metronome,matrix, groove players,filters and panning. I am trying to incorporate an adsr envelope to shape the sound just before it goes into the speaker icon.

i cant find any examples or tutorials on how to connect the adsr on a audio signal. the help file in max msp states that an adsr needs a 1 and a zero (to start and end the envelope)this help file does not correspond to audio ?…… this is where the confusion starts to kick in.
i can take a 1 from the "unpack" from the matrix, but where do i take the zero from ? i know i need to * the signal-to the main signal when it comes out of the adsr. but how do i trigger the adsr when it comes to the use with audio signal.or does the adsr needs to be triggered when using a audio signal.

there must be an easy way to do this, i just cant get my head around it.

any examples or pointers in the right direction is much appreciated, as this is the last part of this patch that needs to be sorted out.

i have uploaded a simple adsr patch
the question is:

is this the right way ???????? it does not seem to work.

cheers

Higgins80

ps. we have all been noobs at one point or antoher


November 15, 2009 | 8:43 pm

You know how to adjust the volume of a signal? Just think about adjusting the volume of time, using adsr.

– Pasted Max Patch, click to expand. –

November 15, 2009 | 10:57 pm

thanks, got it pretty much sorted with this patch

max v2;
#N vpatcher 32 115 979 756;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 739 131 33 196617 clear;
#P newex 273 91 35 196617 r trig;
#P flonum 362 65 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user gain~ 482 472 24 100 158 0 1.071519 7.94321 10.;
#P newex 582 98 45 196617 loadbang;
#P user scope~ 593 429 861 515 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0;
#P newex 729 350 31 196617 print;
#P newex 330 211 29 196617 t b b;
#P window linecount 2;
#P message 660 151 69 196617 setrange 0 0.5;
#P window linecount 1;
#P message 563 150 82 196617 setdomain 2000;
#P button 328 152 15 0;
#P flonum 330 261 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 428 121 24 196617 0.5;
#P message 422 99 19 196617 -1;
#P toggle 410 68 15 0;
#P newex 410 141 27 196617 sig~;
#P window linecount 2;
#P comment 428 69 103 196617 • play normal speed forward/stop;
#P window linecount 1;
#P comment 443 100 63 196617 • backward;
#P comment 454 122 38 196617 • slow;
#P window linecount 3;
#P comment 349 138 54 196617 • start , set sample position;
#P user ezdac~ 469 611 513 644 0;
#P window linecount 1;
#P newex 521 443 27 196617 *~;
#P newex 641 355 31 196617 line~;
#P newex 499 363 73 196617 groove~ sam1;
#P user function 579 224 779 324 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.246667 0;
#X add 542.553162 0.353333 0;
#X add 670.212769 0.2 0;
#X add 1000. 0. 0;
#X add 1010.638245 0.086667 0;
#X domain 2000.;
#X range 0. 0.5;
#X done;
#P connect 23 0 14 0;
#P connect 14 0 17 0;
#P connect 17 0 13 0;
#P connect 10 0 9 0;
#P connect 11 0 9 0;
#P connect 12 0 9 0;
#P connect 22 0 9 0;
#P connect 21 0 4 0;
#P connect 3 0 21 0;
#P connect 9 0 1 0;
#P fasten 13 0 1 0 501 362 504 362;
#P connect 21 0 4 1;
#P connect 1 0 3 0;
#P connect 2 0 3 1;
#P connect 20 0 15 0;
#P connect 17 1 0 0;
#P connect 16 0 0 0;
#P connect 15 0 0 0;
#P fasten 24 0 0 0 584 223;
#P connect 2 0 19 0;
#P connect 0 1 2 0;
#P connect 20 0 16 0;
#P connect 0 1 18 0;
#P pop;

your patch was much help to understand a lot more

once again thanks!!!


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