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.