Distance-Based Amplitude Panning (DBAP) — User Guide
A static Distance-Based Amplitude Panner for placing one mono or stereo source at a fixed point in a 2D speaker map and rendering a 2–8 channel result from inverse-distance gains.
What this does
DBAP Static Panner places a source at one fixed position in a two-dimensional loudspeaker map. It converts the selected source to a mono working signal, calculates one DBAP gain for every speaker from the source-to-speaker distances, duplicates the mono source once per speaker, applies the static gain to each copy, and combines the copies into the final multichannel Sound.
→ convert working copy to mono
→ choose preset source + speaker coordinates
→ calculate source-to-speaker distances
→ apply minimum-distance protection
→ compute inverse-distance gains
→ optional unit-power normalisation
→ duplicate mono source for each speaker
→ apply one static gain per channel
→ combine channels
→ scale final peak to 0.95
→ optional visualisation + playback
DBAP theory
Distance and gain
dᵢ ← max(dᵢ, d_min)
gᵢ = 1 / dᵢᵃ
(x,y) is the fixed source position, (xᵢ,yᵢ) is speaker i, a is Distance_exponent, and d_min is Minimum_distance.
Optional power normalisation
When Normalize_gains is enabled, the raw gain vector is divided by its Euclidean norm:
gᵢ,norm = gᵢ / norm
Σ gᵢ,norm² = 1
0.95 by the current script.
12 presets
Each preset defines the source position and the geometry of the speaker array. The output channel count follows the selected preset.
| Preset | Channels | Source position | Speaker layout |
|---|---|---|---|
| 1. Stereo Center | 2 | (0.0, 0.0) | Speakers at (-1,0) and (1,0) |
| 2. Stereo Left | 2 | (-0.8, 0.0) | Speakers at (-1,0) and (1,0) |
| 3. Stereo Right | 2 | (0.8, 0.0) | Speakers at (-1,0) and (1,0) |
| 4. Triangle Center | 3 | (0.0, 0.0) | Three fixed triangular positions |
| 5. Triangle Front | 3 | (0.0, 0.7) | Same triangular array |
| 6. Quad Center | 4 | (0.0, 0.0) | Four equally spaced points on the unit circle, rotated 45° |
| 7. Quad Front-Left | 4 | (-0.5, 0.5) | Same quad array |
| 8. Hexagon Center | 6 | (0.0, 0.0) | Six equally spaced points on the unit circle |
| 9. Surround 5.1 | 6 | (0.0, 0.3) | Six explicitly defined positions |
| 10. Octagon Center | 8 | (0.0, 0.0) | Eight equally spaced points on the unit circle |
| 11. Octagon Front | 8 | (0.0, 0.7) | Same octagonal array |
| 12. Custom | 2–8 | User Source_x, Source_y | Requested number of speakers, equally spaced on the unit circle |
Quick start
- In Praat, select exactly one mono or stereo Sound object.
- Run script… →
Distance-Based_Amplitude_Panning_(DBAP).praat. - Choose one of the 12 Preset options.
- Adjust Distance_exponent and Minimum_distance if needed.
- Keep Normalize_gains enabled for a unit-power directional gain vector, or disable it if you want the raw inverse-distance ratios before the final peak scaling.
- For preset 12, set Source_x, Source_y, and Number_of_speakers.
- Choose whether to draw the visualisation and play the result, then click OK.
Parameters
| Name (GUI) | Type | Default | Description |
|---|---|---|---|
| Preset | option menu | Stereo Center | Selects one of 11 fixed configurations or the Custom configuration. |
| Distance_exponent | real | 1.0 | Exponent a in the raw gain law 1/dᵃ. |
| Minimum_distance | real | 0.01 | Distance floor used before the inverse-distance calculation. |
| Normalize_gains | boolean | 1 | Normalises the gain vector so the sum of squared gains is 1. |
| Source_x | real | 0.0 | Custom source x-coordinate. Used only by preset 12. |
| Source_y | real | 0.0 | Custom source y-coordinate. Used only by preset 12. |
| Number_of_speakers | natural | 2 | Output/speaker count for preset 12. The script supports up to 8 channels. |
| Draw_visualization | boolean | 1 | Draws the spatial/gain diagnostic display. |
| Play_result | boolean | 1 | Plays the completed result after processing. |
Output
The output object is named:
- Channels: 2, 3, 4, 6, or 8 for the fixed presets; Custom follows Number_of_speakers.
- Source material: every output channel is derived from the same mono working copy.
- Per-channel level: one static DBAP gain is applied to each channel for the full duration.
- Final peak: the completed multichannel object is always scaled to 0.95.
- Info window: reports source name, output channel count, preset, source position, distance exponent, and the calculated gain for every speaker.
Play when Play_result is enabled.
Visualisation
The current visualisation documents the same fixed DBAP geometry and gains used to create the output.
Speaker layout
Unit-circle reference, listener at the centre, source position, speaker coordinates, source-to-speaker lines, channel numbers, and gain labels. Speaker-dot size and connection-line thickness increase with gain.
DBAP gain bars
One bar per channel, with numerical gain labels and a unity reference line when the displayed range includes 1.0.
Mono downmix
A waveform view made by downmixing the finished multichannel result for compact visual reference.
Summary
Preset, speaker count, source coordinates, distance exponent, and the complete gain list.