Distance Attenuation

Computes, for each sound source, its distance to a loudspeaker rig — measured as the distance to the convex hull formed by the speakers — and reports whether the source is inside or outside that hull.

The module receives two point clouds:

  • the sources (one position per index, given as parallel X / Y / Z arrays),
  • the speakers (same layout).

It builds the convex hull of the speakers (in 2D when ignore z is ON, in 3D otherwise) and, for every source, evaluates two things:

  • is inside1 when the source lies inside the hull, 0 otherwise. The inside test is a ray-cast / odd-crossing test on each plane (XY, and additionally YZ + XZ in 3D).
  • distance0 when the source is inside the hull, otherwise the shortest distance from the source to the hull's outline. In 3D the distance is averaged between the YZ and XZ projections.

When only one speaker is connected, the module falls back to a direct point-to-point quadratic distance.

The hull is rebuilt only when the speaker positions change. The source-to-hull evaluation is spread over time (around 50 ms per full pass) so that very large source arrays don't stall the audio thread; sources that haven't moved aren't recomputed unless always process is ON.

Settings

on

Master enable. When OFF the module stops processing and freezes its outputs.

source X

Per-source X coordinates, packed as a data array. The number of sources is min(length(source X), length(source Y)), or min(length(source X), length(source Y), length(source Z)) in 3D.

source Y

Per-source Y coordinates. Same length convention as source X.

source Z

Per-source Z coordinates. Read only when ignore z is OFF.

speaker X

Per-speaker X coordinates, packed as a data array. The number of speakers is min(length(speaker X), length(speaker Y)), or min(length(speaker X), length(speaker Y), length(speaker Z)) in 3D. Any change on this input rebuilds the convex hull.

speaker Y

Per-speaker Y coordinates. Triggers a hull rebuild on change.

speaker Z

Per-speaker Z coordinates. Read only when ignore z is OFF. Triggers a hull rebuild on change.

ignore z

When ON, the module works in 2D using only the X and Y coordinates of sources and speakers. When OFF, the Z coordinate is taken into account and the inside test is run on the three planes (XY, YZ, XZ).

is inside

Per-source switch array. 1 when the source is inside the speaker hull, 0 otherwise. Same length as the source arrays.

distance

Per-source data array. 0 when the source is inside the hull, otherwise the shortest distance from the source to the hull outline. In 3D the value is the average of the YZ and XZ projected distances. When a single speaker is connected, this is the straight-line distance from the source to that speaker (quadratic distance, 2D or 3D depending on ignore z).

always process

When ON, the distance evaluation is recomputed on every block, even if the sources haven't changed. Useful when downstream modules expect a steady refresh rate. When OFF (default), the module only refreshes sources that have changed since the previous pass — cheaper but with a small latency on static scenes.

Common Settings

info

show manual

Button. Opens the manual page of the selected object (or of its parent module for a control) in the web browser. If no page exists for this object, an error is traced in the trace panel.

For more details about information/help creation, see create-help-file.

description

Free multi-line text attached to the module, saved with the patch. It is only meant as an internal note for the patch designer: it is not displayed in the interface.

ID's

visible only in god mode, see setup-panel-tab-expert.

unique ID

Read-only, not saved. Current private numeric ID of the object, used internally to identify it (for example as the target of a bind ID).

preset ID

Read-only, not saved. Private ID used to store and recall the values of this control in presets.

recreate ID

Button. Generates a new unique ID, original ID and preset ID for the object. Use it if you experience difficulties in Polyphonic mode or if two objects share the same ID. Preset values and binds referring to the old IDs are lost.

Object Remote Address

absolute

Read-only, not saved. Absolute address of the object in the Usine objects tree, built from the workspace root. This is the address to use to reach the object from scripts, the objects panel or remote messages. Only shown for objects that are registered in the objects list. See objects-address.

local

Read-only, not saved. Address of the object relative to the current patch, valid inside that patch only. See objects-address.

user addr

Free user-defined address for the object (empty by default). When set, the object is also registered in the objects tree under this name, so it can be reached independently of its position in the workspace (the value is also reported in the mouse-over and mouse-down chunks). Changing it rebuilds the objects list. Only available on objects that support a user address. See objects-address.

See also

version 7.0.250121

Edit All Pages