stereo panning algorithm

elisabatti's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Hi this is a part of a patch I'm building
I'm trying to pan this sound such as at every event the panning is moving from left to right. The problem is that what I hear is a lot of clicks. Is there a better algotrithm for panning in order to remove this clicking?

Noob4Life's icon
Max Patch
Copy patch and select New From Clipboard in Max.

The clicking comes from using events rather than smooth signals. If you can rework your math so that line~(or any interpolated full-signal math) outputs directly into the left and right *~ objects which send to left and right out, then that would be best. Otherwise, a quick solution would be to change back into signal using sig~ or number~(in 'signal output mode') and then using rampsmooth~ or slide~ to smooth the signal changes.
here's the quick-fix inefficient way based on your patch, note that instead of using rampsmooth~ or slide~ i just set number~ via its inspector to have a ramp time of 10ms, there are much more efficient ways than using number~ but it saves me time in providing you with a workable answer. you should play around with different techniques:

________________________________
*Never fear, Noob4Life was never here!*

elisabatti's icon

ok I will try to play a bit around
thx a lot
ciao!