Forums > MaxMSP

Function (as adsr) clicking when retriggering

April 8, 2009 | 3:51 pm

Hi all,
I’m new to the forum, so hi everybody!
I’m actually having an issue with this patch using [function] and [line~] as an envelope (see down):
when i trigger a note before the previous one is released, i hear an annoying click. Is there a way to solve this out?
I was thinking using poly, but it only works when playing very, very slow…

Thank you so much for listening

luca

– Pasted Max Patch, click to expand. –

April 8, 2009 | 4:11 pm

something like this maybe:

– Pasted Max Patch, click to expand. –

or try rampsmooth~ instead.

of course, poly~ would be the best choice.


April 8, 2009 | 8:46 pm

Thank you so much, it is working very well!


April 8, 2009 | 9:28 pm

You may also want to look at doing something like this:

– Pasted Max Patch, click to expand. –

By avoiding [slide~]/[rampsmooth~] you won’t have your envelope changed unnecessarily when you don’t have a reattack (unless that is something you want/need). I seem to think I used to know a more elegant way of doing this, but maybe I’m imagining things in that this is all I could come up with.



Ch
April 9, 2009 | 7:15 am

Quote:I used to know a more elegant way of doing this

probably that one ? :

– Pasted Max Patch, click to expand. –

Charles


April 9, 2009 | 2:03 pm

thank you everybody,
this forum is incredibly generous ^_^

just one last question…:
why is Charles’s patch working? ^_^
i can’t figure out how the simple [route list float] object can make it work out… the output is – as far as i can see – exactly the same, with or without that object. But it IS working ONLY with it. Any tip…? ^_^

thank you


April 9, 2009 | 2:23 pm
personal_username wrote on Thu, 09 April 2009 10:03
just one last question…:
why is Charles’s patch working? ^_^
i can’t figure out how the simple [route list float] object can make it work out… the output is – as far as i can see – exactly the same, with or without that object. But it IS working ONLY with it. Any tip…?

Charles’ example was more along the lines of what I was trying to remember when I posted mine.

Two things to keep in mind about [line~] (and [line]):

1) a list input tells [line~] what value to move to from its current value

2) a float input tells [line~] to set it self immediately to that float value

While the earlier example in this thread (with the message box attached to the [function] output) showed the output to line as "0.12 42.553192 0.76 260.638306 0. 696.808472". If you attack a [print] to the output of [function] you will see that it is actually sending two messages (or the equivalent of "0.0, 0.12 42.553192 0.76 260.638306 0. 696.808472"–a comma in a message just separates the message into two separate messages one to be sent after the other); the first message ("0.0") the value of [line~] to zero and the the second message ("0.12 42.553192 0.76 260.638306 0. 696.808472") has line follow your envelope.

The [route list float] sends any list output from [function] to [line~] where a single float (the zero starting point) doesn’t get sent anywhere. This means that [line~] will always start your envelope from its current location instead of reseting to zero.

Hopefully this longwinded answer is clear.


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