# Dynamic attenuation for a source to silence when moving out of the speakerfield

This might be an obvious question, I apologize if so, but I found that for all panning algorithms once I move a source beyond a speaker in the direction of a speaker (so let’s say positioning behind a speaker in physical space) the source remains at equal level.

For example if I have a speakers with coordinate (xyz)-1 0 0 if I move the source from the origin to this coordinate it will gradually increase as expected, with curve depending on the algorithm, but once I move the source beyond the speaker in the same direction so let’s say to cordinate -3 0 0 the source will stay equally loud on this speaker as if it is still on the same coordinate as the speaker. Is there a way to activate a sloping once the source moves outside the field and beyond the speaker? I have experimented with the spead and radius of the sources but this is only effective when source is inside the speakerfield.

I would like to have a flock of birds moving into the speakerfield and was wondering if it is possible to have them fly in sloping towards the speakers from silence to full range signal

Thanks for the advice,
Robin

Hi Robin,

I presume you are using spat5.pan~
This object implements various panning algorithms, and they do not take the distance into account (only the azimuth and elevation of the sources are relevant).
A notable exception to this rule are the “knn” and “dbap” algorithms which are fundamentally distance-based.

Spread essentially controls the angular extent (or width) of the source; so, not related to distance either.

If you want an attenuation law with respect to distance, you can use the spat5.spat~ object instead. The attenuation “slope” is controlled by the so-called drop factor. (cf spat5.oper)
Alternatively, you could implement your own distance law by applying a gain factor to the source signals.

See also this thread for a somehow similar question.

Best,
T.

Thanks for the quick reply Thibaud,

I was now in the process of working on a formula to implement a distance variable by applying a gain factor to the source signals indeed as your final suggestion done, but with this new information I will also look into spat5.spat~ drop factor also, thanks for pointing this out. My observations were initially based on spat5.pan~ indeed.

Best,
Robin