sofa2json

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Command sofa2json exports SOFA files to JSON.

By default it exports metadata, dimensions, positions, SamplingRate and Delay only. Bulk audio data is gated by per-DataType flags:

--include-ir   FIR  files: include ImpulseResponses
--include-tf   TF / TF-E files: include TFReal/TFImag (TF-E: TFRealE/TFImagE)
--include-sos  SOS  files: include SOSCoefficients

Frequencies are included automatically (small) for TF / TF-E. JSON keys are the field names of sofa.File; positions and vectors are [x, y, z] triples in their coordinate Type and Units, which are exported alongside. NaN and ±Inf are written as null.

Usage:

sofa2json [flags] [file.sofa ...]

Each file is written to <file>.json (replacing the .sofa extension); an existing output file is an error unless -f is given. Without file arguments every .sofa file in the current directory is converted. Progress and errors go to stderr; the exit status is 1 if any file failed and 2 on a usage error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL