Keep only the Rosella and .jochrtf binaural paths
The runtime renders two inputs now: the Rosella .personalized_headphone model and an already compiled .jochrtf field. SOFA import, the full-HRIR direct renderer and the SOFA -> .jochrtf fitting compiler leave this checkout; they continue as an offline tool that only produces caches this repository loads. The .jochrtf renderer goes back to the implementation that predates the direct SOFA work: 64-QMF analysis, 77 hybrid bands, per-object hybrid path delays and the project room (six first-order images plus the shared FDN tail) computed in code. It is restored verbatim under the .jochrtf vocabulary (SofaBinauralBackend -> JochrtfBackend) and gains one switch: --jochrtf-room on|off, off by default. With the room off the renderer outputs only the field's direct binaural sound, and in either mode it reads no audio assets. Because the room is computed in code again, the generated sofa-room*.npz assets and the modules only the SOFA path used are removed (sofa_canonical, sofa_hrir, sofa_direct_backend, sofa_room, hybrid_paths, partitioned_convolution, point_source, compile_hrtf, generate_sofa_room). data/ keeps the decode tables and the Rosella filterbanks. The CLI drops --sofa-hrtf, --hrtf-radius-m, --sofa-interpolation, --hrtf-cache-policy, --hrtf-cache-dir, --sofa-room, --sofa-room-preset and --source-reference-distance-m. A .jochrtf is still explicit through --compiled-hrtf-cache, and the default binaural input is the personalized model. Rosella parsing, filterbank, room and timing are untouched and its output stays bit-identical. The .jochrtf path reproduces the pre-SOFA renderer sample for sample, with the room on and with it off.
This commit is contained in:
1 parent
3ea285e407
commit
07a26b41fe
21 files changed
+692
-2309
No files matched your search
@@ -4,26 +4,6 @@
|
||||
|
||||
This directory contains static production tables. It does not contain user HRTFs.
|
||||
|
||||
SOFA and compact HRTF inputs render direct sound by default. Optional `--sofa-room`
|
||||
loads generated FIR assets from the original four-line FDN in `public_room.py`.
|
||||
It contains no HRTF or external-model coefficients. Early reflections use the same
|
||||
module's six-wall image model and the selected full HRIRs or compact field. Personalized rendering
|
||||
continues to use its model's room parameters.
|
||||
|
||||
Both archives use `sofa-project-room-v1`, 48 kHz and float64. `sofa-room-compact.npz`
|
||||
contains `[2,37383]` taps and is the Near/Mid default; `sofa-room.npz` contains
|
||||
`[2,81600]` taps for the Far default and explicit original-room selection. JSON records
|
||||
FDN/geometry parameters, coefficient SHA-256 and omitted tail energy.
|
||||
|
||||
Compact dimensions follow [model 9 in Zahorik 2009, Table 1](https://pmc.ncbi.nlm.nih.gov/articles/PMC2730711/).
|
||||
Late time scales follow the V/S ratio of the original project preset; this does not
|
||||
reproduce the paper's BRIR algorithm. Regenerate both assets with:
|
||||
|
||||
```powershell
|
||||
python src\generate_sofa_room.py
|
||||
python src\generate_sofa_room.py --preset compact
|
||||
```
|
||||
|
||||
`tables.npz` contains the JOC core decoding tables:
|
||||
|
||||
```text
|
||||
|
||||
+2
-19
@@ -4,22 +4,6 @@
|
||||
|
||||
本目录保存 Python 生产路径使用的静态表数据,不保存用户 HRTF。
|
||||
|
||||
SOFA与压缩HRTF输入默认仅渲染直达声。可选`--sofa-room`读取下列资产,由原项目`public_room.py`中的同一四路FDN独立生成,不包含HRTF或外部模型系数。早反射按资产记录的几何使用同一六面镜像算法计算,随后使用所选完整HRIR或压缩方向场。个性化路线继续读取其模型自身的房间参数。
|
||||
|
||||
格式均为`sofa-project-room-v1`,采样率48 kHz。JSON记录FDN及几何参数、系数SHA-256和截断尾能量。
|
||||
|
||||
| 文件 | 预设 | `late_fir` |
|
||||
|---|---|---|
|
||||
| `sofa-room-compact.npz` | Near/Mid默认紧凑房间 | `float64[2,37383]` |
|
||||
| `sofa-room.npz` | Far默认/可显式选择的原大房间 | `float64[2,81600]` |
|
||||
|
||||
紧凑预设的尺寸取自[Zahorik 2009表1的模型9](https://pmc.ncbi.nlm.nih.gov/articles/PMC2730711/),晚期时间尺度按本项目原预设的`V/S`比例缩放;它不是对论文BRIR的完整复现。可重生成两套资产:
|
||||
|
||||
```powershell
|
||||
python src\generate_sofa_room.py
|
||||
python src\generate_sofa_room.py --preset compact
|
||||
```
|
||||
|
||||
`tables.npz` 保存 JOC 核心解码表:
|
||||
|
||||
```text
|
||||
@@ -37,7 +21,7 @@ joc_huff_code_7ch_pos_index_sparse int64[6,2]
|
||||
|
||||
## 双耳渲染表
|
||||
|
||||
`rosella_kernels.npz` 保存`.jochrtf`压缩渲染和个性化bank 1使用的64-QMF/77-hybrid固定表;完整SOFA路线直接在PCM域卷积:
|
||||
`rosella_kernels.npz` 保存`.jochrtf`压缩渲染和个性化bank 1使用的64-QMF/77-hybrid固定表:
|
||||
|
||||
```text
|
||||
format_version little-endian int32[1]
|
||||
@@ -99,6 +83,5 @@ HRTF 或 room 调参。
|
||||
|
||||
标准可公开获取不等于获准实施相关专利。
|
||||
|
||||
`.sofa` 是用户可见的 source of truth;`.jochrtf` 是可删除、可从 SOFA 重建的
|
||||
JOC compiled HRTF cache。cache 含有源 HRTF 的变换数据,仍受源 SOFA/HRTF
|
||||
`.jochrtf` 是可删除、可从 SOFA 重建的 JOC compiled HRTF cache。cache 含有源 HRTF 的变换数据,仍受源 SOFA/HRTF
|
||||
数据集的许可与再分发限制约束。
|
||||
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user