< Back to IRCAM Forum

Distance compensation with KNN/DBAP

Hi all,

As I continue to explore the capabilities/best practices of spat5.spat~, I came across the following statement in spat5.tuto-alignment-1.maxpat:

Only the angular directions (azimuth, elevation) of the loudspeaker are relevant.

This remark holds for all panning processors in Spat (e.g. spat5.pan~, spat5.spat~, spat5.pan, etc.) and for most panning techniques (vbap, angular, etc.)

However, there are some exceptions: the “knn” and “dbap” panning algorithms are fundamentally distance-based, and therefore the distance of the loudspeakers is taken into account.

What exactly does “the distance of the loudspeakers is taken into account” mean? Does it imply that alignment is not necessary for non-spherical setups when using knn/dbap? Or simply that the speaker locations are taken into account when computing the individual speaker gains?

My ultimate goal is to experiment with different panning algorithms (e.g. the various flavors of vector-based panning, knn, dbap, spcap, hoa) to find which methods provide the best results for our use case. Ideally, I’ll handle time delay, level compensation, and room correction externally, directly on the speakers using the genelec software (rather than using spat5.align~), so my concern is that I could end up accidentally correcting for these factors twice when using knn/dbap.

Thanks!
-eric

Hello again Eric,

For vbap, angular, hoa, only the directions (i.e. azimuth and elevation angles) of the speakers and sources are used to calculate the panning gains.
These types of panning assume that the loudspeaker setup is ‘surround’ (e.g. circular array or dome), and that delay/level compensation is applied.

For knn and dbap, the panning gains are calculated according to the distance between sources and speakers. The loudspeaker setup can be arbitrary, and delay/level compensation shall not be applied.

Best,
T.

Thanks Thibaut, that’s helpful to know.

One more follow up question: in your opinion, are there any particular panning algorithms and/or settings (e.g. decoding types/methods in the case of hoa3d) that tend to produce the “best” results, i.t.o. realism/accuracy/etc.?

I suppose it’d be helpful to know: our setup is a sphere-ish 37 speaker array (more like a cylinder) with a diameter of ~3.25 m and height of ~2.5 m with speakers on 4 levels (see attached) + one sub outside the dome. And as far as source material goes, the main use case will be diffusion of speech signals in simulated “difficult listening environments” (e.g. cocktail party problem or blended with the ambience of a train station recorded with an ambisonic mic).

Thanks!
-eric


----------begin_max5_patcher----------
1751.3ocyassbihCD8YmuBW7brC5B21m186XlTtvFEGMCVPAxIY1ol+8UW.A
3fH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