clip question

ulodin's icon

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.

Max Patch
Copy patch and select New From Clipboard in Max.

AlexHarker's icon

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.

HTH

A.

pdelges's icon

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.

p

ulodin's icon

Thanks guys for your replaies..

@ALEX:
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!

@PATRICK:
Yes, the reason must be that, for sure....

I love you guys...

ulodin's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

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?

pdelges's icon

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 neverlistening!) 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.

p

1129.Screen_shot_2010-09-14_at_14.40.37.png
png
ulodin's icon

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...
Federico

pdelges's icon

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

p

ulodin's icon

really fantastic...

thanks again! :)