@maruaudio/dsp/acoustics/materials-table is the pyroomacoustics materials database as constant typed arrays: 91 energy-absorption entries and 8 scattering entries, each with a name, a category, an offset and length into a shared coefficient array and matching centre frequencies. The file is generated from upstream data/materials.json by bin/gen-acoustics-materials.mjs and pinned to that file's (ACOUSTICS_MATERIALS_JSON_SHA256). @maru/acoustics-materials reads it.
const id = ACOUSTICS_ABSORPTION_NAMES.indexOf("brickwork")
const at = ACOUSTICS_ABSORPTION_OFFSETS[id]
const n = ACOUSTICS_ABSORPTION_LENGTHS[id]
// coefficients ACOUSTICS_ABSORPTION_COEFFS[at.. at + n)Lifecycle
None: read-only data, built once at module load. Entry ids are array indices and the tables are append-only. Regenerate with the generator; do not edit the file by hand.
When to use it
Listing the available surfaces in a room editor, or reading a database row without the Material helpers. Name lookups, curve resampling and validation belong to @maru/acoustics-materials.
Limits
- The database's centre frequencies are the seven octaves 125 Hz to 8 kHz.
- An entry with one coefficient is flat; its centre frequency is stored as 0 and never read.
- Id 0 in each table is upstream's built-in entry (
anechoicandno_scattering). - The arrays are shared constants. Mutating them changes every consumer.