Forums > MaxMSP

clip question

Sep 14 2010 | 9:41 am

Hi all,

this signal flow is part of a larger patch. I really don’t figure out why audio out clips. Can you give a suggestion?

Really thanks guys.

— Pasted Max Patch, click to expand. —
Sep 14 2010 | 11:50 am

How high are the gain sliders? If you put them to them all the way up the gain will be greater than 1. Other than that I can’t see any obvious reason your audio might clip. However, even if they are at 1. then the interpolation in play~ could (correctly) produce values above 1. so you need a bit of headroom maybe.

Also, kind of depends what else is in the patch. It’s the sum of all outputs that needs to be within range, not just each one.



Sep 14 2010 | 11:59 am

Your patch isn’t clipping, but you sometimes have some DC. It can happen when the play~ is stopped in the middle of a buffer and outputs a DC.

This is the case if the length of your enveloppe (random 100 + 1 -10) is longer than the length of the sound excerpt played.


Sep 14 2010 | 12:08 pm

Thanks guys for your replaies..

Clips i intend are like not zero-crossing cuts; they don’t seems to be produced by a saturation. Infact you can hear this behavior at every level of gain sliders. To me they are produced by bad signal flowing, don’t they?
However, if you look at the right of the patch, [random] produce values between 0. and 1.; and then is multiplied by the [play] output.
The multiplier receive first the the [line~] value and then the [play~] signal; is it the right flow?
If this flowing should be correct, i really don’t understand why i have this clips…

thanks again!

Yes, the reason must be that, for sure….

I love you guys…

Sep 14 2010 | 12:18 pm

Ok, here is a correct version; or i thought it was, but it seems i still wrong something…

— Pasted Max Patch, click to expand. —

clips are still there; but the Max Window show me that envelopes duration is shorter than [play~] duration…am i in wrong?

thanks again guys!

EDIT: should the metro rate be part of the problem?

Sep 14 2010 | 12:44 pm

Now, there is no DC anymore, but clicks because you restart your enveloppe before it reached its end. In your first patch, there were silences between sounds, now there isn't anymore.

To debug this kind of patches, I often record control signals (like your enveloppe) in a soundfile and look at it (looking but never listening!) in a sound editor. So you can see what's going on: when the enveloppe is vertical (it looses its continuity), you get a click.



  1. Screen_shot_2010-09-14_at_14.40.37.png


Sep 14 2010 | 3:52 pm

Here we go.

Thanks Patrick!
It is definetely that…
So i have to link the [metro] with the envelope section…

Your "testing" way is pretty interesting! Which kind of routing you use in order to make this task? Soundflower?

Again, many many thanks…

Sep 14 2010 | 4:05 pm

No need for routing, I simply use Quickrecord in Max’ Extras menu.
You could also replace the dac~ with a sfrecord~


Sep 14 2010 | 4:09 pm

really fantastic…

thanks again! :)

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

Forums > MaxMSP