Skip to main content

Crate goonj

Crate goonj 

Source
Expand description

§Goonj

Goonj (गूँज — Hindi/Urdu for “echo, resonance”) — acoustics engine for the AGNOS ecosystem.

Provides sound propagation, room simulation, ray-based acoustic tracing, impulse response generation, diffraction, and resonance analysis. Built on hisab for math.

§Example

use goonj::{propagation, impulse, material::AcousticMaterial};

let speed = propagation::speed_of_sound(20.0);
assert!((speed - 343.4).abs() < 0.1);

let rt60 = impulse::sabine_rt60(500.0, 50.0);
assert!(rt60 > 0.0);

Re-exports§

pub use error::GoonjError;
pub use error::Result;
pub use impulse::ImpulseResponse;
pub use impulse::eyring_rt60;
pub use impulse::sabine_rt60;
pub use material::AcousticMaterial;
pub use propagation::doppler_shift;
pub use propagation::inverse_square_law;
pub use propagation::speed_of_sound;
pub use ray::AcousticRay;
pub use ray::MultibandRay;
pub use ray::RayHit;
pub use ray::RayPath;
pub use resonance::room_mode;
pub use resonance::schroeder_frequency;
pub use room::AcceleratedRoom;
pub use room::AcousticRoom;
pub use room::RoomGeometry;
pub use room::Wall;

Modules§

ambisonics
Ambisonics encoding (1st-order B-Format and 3rd-order HOA). Ambisonics encoding — spatial sound field representation.
analysis
Room acoustics analysis metrics (C50, C80, D50, EDT, G, ts, LF, IACC, STI). Room acoustics analysis metrics per ISO 3382-1 and IEC 60268-16.
beam
Beam tracing — volumetric sound propagation without sampling artifacts. Beam tracing — volumetric sound propagation without sampling artifacts.
coupled
Coupled room acoustics — multi-room energy exchange and double-slope decay. Coupled room acoustics — multi-room energy exchange.
diffraction
Edge diffraction loss and occlusion detection (UTD, BTM).
diffuse
Stochastic ray tracing (diffuse rain) for late reverberation tails. Diffuse rain — stochastic ray tracing for late reverberation tails.
diffusion
Acoustic diffusion equation — energy density PDE solver. Acoustic diffusion equation (ADE) — energy density PDE solver.
directivity
Source directivity patterns (omnidirectional, cardioid, tabulated balloon data). Source directivity patterns for frequency-dependent sound radiation.
error
Error types for the goonj crate.
fdn
Feedback Delay Network (FDN) for efficient late reverberation synthesis. Feedback Delay Network (FDN) for efficient late reverberation synthesis.
hybrid
Hybrid frequency crossover — blending wave-based and geometric results. Hybrid frequency crossover — blending wave-based and geometric results.
image_source
Image-source method for exact early specular reflections. Image-source method for computing exact early specular reflections.
impulse
Impulse response generation, RT60 estimation, and energy decay curves.
integration
Integration APIs for downstream consumers (dhvani, kiran, soorat). Integration APIs for downstream consumers.
material
Acoustic materials with frequency-dependent absorption, scattering, and transmission.
outdoor
ISO 9613-2 outdoor sound propagation methods. ISO 9613-2 outdoor sound propagation methods.
portal
Portal-based sound propagation through openings between rooms. Portal-based sound propagation through openings between rooms.
propagation
Sound propagation: speed of sound, inverse square law, Doppler, atmospheric effects.
radiosity
Acoustic radiosity — energy exchange between surface patches. Acoustic radiosity — energy exchange between surface patches.
ray
Acoustic ray tracing: single-band, multiband, BVH-accelerated. Acoustic ray tracing — intersection, reflection, and scene-level multiband tracing.
resonance
Room resonance modes, Schroeder frequency, and modal density.
room
Room geometry, walls, and acceleration structures.
scattering
Vector-based scattering for diffuse reflections (cosine-weighted hemisphere sampling). Vector-based scattering model for diffuse reflections.
udfa
Universal Diffraction Filter Approximation (UDFA) for real-time diffraction. Universal Diffraction Filter Approximation (UDFA).
vibroacoustics
Vibroacoustics — structural vibration to acoustic radiation coupling. Vibroacoustics — coupling between structural vibration and acoustic radiation.