# diffusion defines the apparent size or spread of a source: from tight point sources to fully spatialized textures. may be mapped per-frequency or per-partial. ## introduction The diffusion domain sits in the spatial layer, after `position` (static anchor) and `motion` (time-varying trajectories). It controls how broadly energy is distributed around each source point-shaping apparent size or texture. All diffusion is precomputed, additive, and deterministic: once `a` and `b` are set, every partial's or frequency band's spread is fixed. ## overview Each form disperses energy according to a distinct spatial model: ### 0. `uniform_circle` - Behavior: spreads each partial uniformly within a circular region around its anchor point - Analogy: scattering pebbles evenly in a disk - Parameters: - `a`: radius of the circle (0 = point → 1 = full stereo half-width) - `b`: edge concentration (0 = uniform fill → 1 = all points at the perimeter) ### 1. `gaussian_blur` - Behavior: distributes energy by a Gaussian profile centered on the anchor - Analogy: blurry spotlight with soft fall-off - Parameters: - `a`: standard deviation σ relative to field size (0 → narrow → 1 → very wide) - `b`: amplitude skew (0 = symmetric → 1 = tail bias toward one side) ### 2. `spectral_spread` - Behavior: varies spread radius by frequency band, mapping lows vs. highs to different widths - Analogy: bass feels close and tight, treble feels wide and airy - Parameters: - `a`: cutoff frequency (0 → 20 Hz … 1 → 20 kHz) separating “narrow” vs. “wide” bands - `b`: slope of spread change (−1 = wide lows & narrow highs → 0 = neutral → +1 = narrow lows & wide highs) ### 3. `random_texture` - Behavior: assigns each partial a pseudorandom fixed offset within a specified range, creating a textured cloud - Analogy: stars sprinkled randomly across the sky - Parameters: - `a`: pseudorandom seed (0…1) - `b`: maximum radial deviation (0 = no spread → 1 = full stereo half-width) ## parameter behavior summary - uniform\_circle - `a` controls overall radius; - `b` shifts density toward the edge. - gaussian\_blur - `a` sets blur width (σ); - `b` skews the Gaussian tail. - spectral\_spread - `a` selects the spectral breakpoint; - `b` adjusts how steeply spread changes with frequency. - random\_texture - `a` picks the randomization pattern; - `b` scales maximum displacement. ## why these were chosen - Coverage of diffusion archetypes: uniform, Gaussian, frequency-dependent, and pseudorandom textures capture the main perceptual modes of spatial spread. - Orthogonal dimensions: each form's logic is distinct and cannot be replicated by parameter tweaking in another form. - Two-parameter purity: `a` selects topology or pattern, `b` shapes intensity or bias-maintaining parametric simplicity. - Deterministic and additive: all spreads are computed in advance, aligning with the engine's no-runtime-logic mandate. ## what is not included - Time-varying or reactive diffusion: those are in the `motion` or structural layers. - Reverberation or convolution-based spread: outside pure spatial mapping. - 3D surround or elevation cues: limited to 2D pan-field here. - Dynamic density changes: onset-driven or envelope-shaped diffusions belong elsewhere. ## conclusion The diffusion domain delivers four compact, deterministic models for spreading sound sources in space-ranging from precise point-like emission to rich, static textures-complementing `position` and `motion` and fulfilling the project's goal of fully precomputed, structurally grounded spatial synthesis.