Forums > MaxMSP


Mar 07 2011 | 9:31 pm

Is there any way to hook up an adsr to an audio file ? I tried to hook the adsr up to a sampler I built but to no avail. I successfully have hooked up adsr with a synth BUT NOT ABLE TO DO THIS WITH BUFFER, GROOVE, etc… ‘I basically want to have enveloping on a real time sample(r) can I use ADSR or is this the wrong approach?

Mar 07 2011 | 9:52 pm

If the decay portion of adsr isn’t critical to you, you can tie a [trapezoid~] object to the sync outlet (right) of [groove~], which converts the 0. – 1. ramp over the loop/oneshot duration into an envelope with attack, sustain and release. Otherwise, look at the [function] object. But I can’t see why adsr isn’t working for you in this way – you should post a patch or small excerpt demonstrating this.


Mar 07 2011 | 10:47 pm

OK thanks SO SO much… I will try this and get back to you…

Mar 08 2011 | 6:35 pm

Ok… It is sort of working but the adsr is really not doing what I want… I want it to treat the sound file like a synth voice… Here is a screen shot of what I tried… Am I doing something wrong? Can you please post a file that would work for me… Thanks


  1. Screenshot20110308at1.26.40PM.png


Mar 08 2011 | 7:11 pm

Dude, please turn off that dac~ asap! :) Having a sustain of 38 is no good. That’s your output-level, keep it below 1. I think what you want is accomplished by "fidlle" and some other objects. I believe one of Baz’s excellent youtube tutorials covers this. Which i can recommend anyway.

Good luck!


As for an envelope-follower (what i think you mentioned in your first post), just search the forum

Mar 09 2011 | 3:40 am

Aight brutha. +1 on FRid’s post, sustain needs to be between 0. and 1. you can use a flonum (just press the ‘f’ key)

if you open it’s inspector (cmd-i on a mac when it’s highlighted) you can change it’s minimum and maximum value in the ‘value’ tab.

im not sure how much you know about max, but it doesn’t work like you’d think a synth would. you need to connect the output of the adsr~ to the right inlet of a *~ object, and the left outlet of groove~ to the left inlet of said *~. that way, the signal coming out of the groove~ is multiplied by the numbers comin out of your envelope (which will always be between zero and your sustain level which again, should always be under 1)

it’s a good thing you don’t have it hooked up right (especially if you’re wearing headphones!) since your sustain of 38. would blow your brains up (it would really just play as loud as your computer possibly could, aka too loud.)

so yeah, too many parentheses and no capitalization, deal wid it.

patch attached!

Mar 12 2011 | 7:00 am

Ok maybe I am doing something wrong … But the patch you built… The adsr has very little effect on the sound… Am I doing something wrong? PS Thanks so so much for the patch .. I am understanding more now…

Mar 12 2011 | 9:33 am

Hi azahn

I tried the patch too and [adsr~] doesn’t appear to be working as expected; the Max window reads "adsr~_mute mute 0"……….couldn’t solve it, but here’s the patch with [trapezoid~] instead:

— Pasted Max Patch, click to expand. —


Mar 12 2011 | 9:36 am


had the {adsr~] helpfile open; and [adsr~] works as expected; i’ll try and suss out why it’s not working in the patch above


Mar 12 2011 | 9:04 pm

Here’s a take on it. First I derive a gate signal (in analog synth parlance) from the % done of groove~. I use this to drive ADSR.

-- Pasted Max Patch, click to expand. --

Mar 13 2011 | 8:02 am

These are closer … Chris Muir’s patch is the closest to what I want… But these still seem to be wonky… I really really appreciate everyone’s help !!! I’m really glad I started a thread that keeps going ! Let’s hope there is more to come ….!!!!!

Mar 13 2011 | 8:22 am

You will have to come up with a better description of how it doesn’t do what you want, than "wonky."

Mar 13 2011 | 8:57 am

Here’s a completely different approach. Instead of an envelope, there’s a table that gets interpolated over the length of the sample. You draw your envelope.

-- Pasted Max Patch, click to expand. --

Apr 01 2014 | 11:58 am

Hello,i´m trying to build a synth with 2 wavetables, using groove to read from the buffer and i´d like to add an envelope (adsr or function). I´m stuck in this part i don´t know how to apply CHRIS MUIR envelopes or NOOB MEISTER trapezoid to my recent started proyect!

I´m a newbie in max and this is my very first patch, step by step i would like to add more ingredients (LFO, FILTERs) so I´d apreciate any suggestions and advices.

Apr 01 2014 | 4:59 pm

A simple adsr~ example

-- Pasted Max Patch, click to expand. --

Apr 01 2014 | 7:45 pm

thank you, but this doesn´t make stop the groove.

Apr 01 2014 | 11:28 pm

You didn’t say you wanted the groove~ to stop. It’s easy enough, but I really think that you should go through the Max & MSP tutorials. There seems to be a lot of basic stuff that you don’t have a good understanding of that you will need to know in order to get much further than you have.

-- Pasted Max Patch, click to expand. --

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

Forums > MaxMSP