Skip to content

Commit 39675db

Browse files
committed
updated git ignore after spatial render move and deprecetaed vbap componenets
1 parent 96e60ef commit 39675db

12 files changed

Lines changed: 4464 additions & 451 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Batch multichannel WAV rendering from a LUSID scene. Direct binary invocation is
144144
Options:
145145
--render_resolution <mode> block (default), sample, smooth
146146
--block_size <n> Block size for block mode (default: 64)
147-
--spatializer <type> dbap (default), vbap, lbap
147+
--spatializer <type> dbap (default), lbap
148148
```
149149

150150
---

build-offline/source/spatial_engine/spatialRender/CMakeFiles/spatialroot_spatial_render.dir/SpatialRenderer.cpp.o.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ source/spatial_engine/spatialRender/CMakeFiles/spatialroot_spatial_render.dir/Sp
946946
/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/print \
947947
/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include/unistd.h \
948948
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/math/al_Constants.hpp \
949-
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/sound/al_Vbap.hpp \
949+
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/sound/al_Dbap.hpp \
950950
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/sound/al_Spatializer.hpp \
951951
/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/iostream \
952952
/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/istream \
@@ -966,8 +966,8 @@ source/spatial_engine/spatialRender/CMakeFiles/spatialroot_spatial_render.dir/Sp
966966
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/math/al_Mat.hpp \
967967
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/math/al_Quat.hpp \
968968
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/spatial/al_DistAtten.hpp \
969-
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/sound/al_Dbap.hpp \
970969
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/sound/al_Lbap.hpp \
970+
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/sound/al_Vbap.hpp \
971971
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../src/JSONLoader.hpp \
972972
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../src/LayoutLoader.hpp \
973973
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../src/WavUtils.hpp \

build-offline/source/spatial_engine/spatialRender/CMakeFiles/spatialroot_spatial_render.dir/compiler_depend.internal

Lines changed: 2076 additions & 75 deletions
Large diffs are not rendered by default.

build-offline/source/spatial_engine/spatialRender/CMakeFiles/spatialroot_spatial_render.dir/compiler_depend.make

Lines changed: 2357 additions & 318 deletions
Large diffs are not rendered by default.
Binary file not shown.

build-offline/source/spatial_engine/spatialRender/CMakeFiles/spatialroot_spatial_render.dir/main.cpp.o.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ source/spatial_engine/spatialRender/CMakeFiles/spatialroot_spatial_render.dir/ma
967967
/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/unordered_set \
968968
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/math/al_Vec.hpp \
969969
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/math/al_Constants.hpp \
970-
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/sound/al_Vbap.hpp \
970+
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/sound/al_Dbap.hpp \
971971
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/sound/al_Spatializer.hpp \
972972
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/io/al_AudioIOData.hpp \
973973
/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/cassert \
@@ -985,8 +985,8 @@ source/spatial_engine/spatialRender/CMakeFiles/spatialroot_spatial_render.dir/ma
985985
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/math/al_Mat.hpp \
986986
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/math/al_Quat.hpp \
987987
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/spatial/al_DistAtten.hpp \
988-
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/sound/al_Dbap.hpp \
989988
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/sound/al_Lbap.hpp \
989+
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../../../internal/cult-allolib/include/al/sound/al_Vbap.hpp \
990990
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../src/JSONLoader.hpp \
991991
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../src/LayoutLoader.hpp \
992992
/Users/lucian/Projects/spatialroot/source/spatial_engine/spatialRender/../src/WavUtils.hpp
Binary file not shown.

internalDocs/SPATIALIZATION.md

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ See [DEPENDENCIES.md](DEPENDENCIES.md) for LUSID scene and speaker layout JSON f
1515

1616
Three spatializers supported:
1717

18-
| Feature | DBAP (default) | VBAP | LBAP |
19-
|---|---|---|---|
20-
| **Coverage** | No gaps (works anywhere) | Can have gaps | No gaps |
21-
| **Layout Req** | Any layout | Good 3D triangulation | Multi-ring layers |
22-
| **Localization** | Moderate | Precise | Moderate |
23-
| **Speakers/Src** | Distance-weighted (many) | 3 speakers (exact) | Layer interpolation |
24-
| **Best For** | Unknown/irregular layouts | Dense 3D arrays | AlloSphere, TransLAB |
25-
| **Params** | `--dbap_focus` (0.1–5.0) | | `--lbap_dispersion` (0–1.0) |
18+
| Feature | DBAP (default) | LBAP |
19+
|---|---|---|
20+
| **Coverage** | No gaps (works anywhere) | No gaps |
21+
| **Layout Req** | Any layout | Multi-ring layers |
22+
| **Localization** | Moderate | Moderate |
23+
| **Speakers/Src** | Distance-weighted (many) | Layer interpolation |
24+
| **Best For** | Unknown/irregular layouts | AlloSphere, TransLAB |
25+
| **Params** | `--dbap_focus` (0.1–5.0) | `--lbap_dispersion` (0–1.0) |
2626

2727
Pipeline: Source WAVs + LUSID scene + Layout JSON → N-channel WAV
2828

@@ -36,14 +36,6 @@ Pipeline: Source WAVs + LUSID scene + Layout JSON → N-channel WAV
3636
--sources data/processedData/stageForRender/ \
3737
--out render.wav
3838

39-
# VBAP
40-
./build/source/spatial_engine/spatialRender/spatialroot_spatial_render \
41-
--spatializer vbap \
42-
--layout allosphere_layout.json \
43-
--positions scene.lusid.json \
44-
--sources ./stageForRender/ \
45-
--out render_vbap.wav
46-
4739
# DBAP with tight focus
4840
./build/source/spatial_engine/spatialRender/spatialroot_spatial_render \
4941
--spatializer dbap --dbap_focus 3.0 \
@@ -63,7 +55,7 @@ Pipeline: Source WAVs + LUSID scene + Layout JSON → N-channel WAV
6355
```
6456

6557
**Required flags:** `--layout`, `--positions`, `--sources`, `--out`
66-
**Spatializer:** `--spatializer dbap|vbap|lbap`, `--dbap_focus`, `--lbap_dispersion`
58+
**Spatializer:** `--spatializer dbap|lbap`, `--dbap_focus`, `--lbap_dispersion`
6759
**General:** `--master_gain`, `--solo_source`, `--t0`, `--t1`, `--elevation_mode`, `--debug_dir`
6860

6961
### Duration Handling (Feb 16, 2026)
@@ -105,8 +97,8 @@ Pipeline: Source WAVs + LUSID scene + Layout JSON → N-channel WAV
10597

10698
### Robustness Features
10799

108-
**Zero-Block Detection & Fallback (VBAP):**
109-
- Detects when spatializer produces silence despite input energy (VBAP coverage gaps)
100+
**Zero-Block Detection & Fallback:**
101+
- Detects when spatializer produces silence despite input energy
110102
- Fallback: retarget direction 90% toward nearest speaker
111103
- Threshold: `kPannerZeroThreshold = 1e-6`
112104

@@ -137,7 +129,6 @@ End-of-render diagnostics (`--debug_dir` writes `render_stats.json`, `block_stat
137129
- `source/spatial_engine/src/JSONLoader.cpp/.hpp` — LUSID scene parser
138130
- `source/spatial_engine/src/LayoutLoader.cpp/.hpp` — speaker layout parser
139131
- `source/spatial_engine/src/WavUtils.cpp/.hpp` — WAV/RF64 I/O
140-
- `source/spatial_engine/src/vbap_src/VBAPRenderer.cpp/.hpp` — VBAP implementation
141132

142133
### Algorithm Details
143134

source/spatial_engine/spatialRender/SpatialRenderer.cpp

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ SpatialRenderer::SpatialRenderer(const SpeakerLayoutData &layout,
4646
// converts to radians using toRad() which assumes degree input
4747
// Without this conversion you get speaker positions at completely wrong angles
4848
// like -77.7 radians instead of -77.7 degrees which is way outside valid range
49-
// This caused VBAP to fail silently and produce zero output
49+
// This caused spatialization to fail silently and produce zero output
5050
//
5151
// CRITICAL FIX 2: AlloSphere hardware uses non-consecutive channel numbers 1-60 with gaps
5252
// but spatializers need consecutive 0-based indices for AudioIOData buffer access
@@ -130,9 +130,7 @@ SpatialRenderer::SpatialRenderer(const SpeakerLayoutData &layout,
130130

131131
// Create spatializers using unique_ptr (LBAP has broken copy semantics in AlloLib)
132132

133-
// VBAP removed from offline engine - requires 3D speaker arrangements for triangulation
134133
// Use DBAP (default) or LBAP for 2D layouts
135-
std::cout << "VBAP removed from offline engine (requires 3D layouts)\n";
136134

137135
// DBAP - distance-based amplitude panning
138136
// Note: DBAP doesn't need compile() - it uses distance-based calculations
@@ -349,8 +347,7 @@ al::Vec3f SpatialRenderer::nearestSpeakerDir(const al::Vec3f& dir) {
349347
}
350348
}
351349

352-
// Return direction 90% toward the speaker to stay inside hull
353-
// This ensures VBAP can still find a valid triplet
350+
// Return direction 90% toward the nearest speaker for a robust fallback.
354351
al::Vec3f spkDir = mSpeakerDirs[bestIdx];
355352
al::Vec3f blended = dir * 0.1f + spkDir * 0.9f;
356353
return safeNormalize(blended);
@@ -818,11 +815,11 @@ MultiWavData SpatialRenderer::render(const RenderConfig &config) {
818815
if (config.renderResolution == "block") {
819816
renderPerBlock(out, config, startSample, endSample);
820817
} else if (config.renderResolution == "sample") {
821-
std::cerr << " ERROR: 'sample' mode is DISABLED (VBAP removed). Use 'block' mode instead.\n";
818+
std::cerr << " ERROR: 'sample' mode is DISABLED. Use 'block' mode instead.\n";
822819
std::cerr << " For per-sample accuracy, use 'block' mode with --block_size 1.\n";
823820
return {}; // Return empty result
824821
} else if (config.renderResolution == "smooth") {
825-
std::cerr << " ERROR: 'smooth' mode is DISABLED (VBAP removed). Use 'block' mode instead.\n";
822+
std::cerr << " ERROR: 'smooth' mode is DISABLED. Use 'block' mode instead.\n";
826823
std::cerr << " For smooth interpolation, use 'block' mode with small --block_size.\n";
827824
return {}; // Return empty result
828825
} else {
@@ -1029,7 +1026,7 @@ void SpatialRenderer::renderPerBlock(MultiWavData &out, const RenderConfig &conf
10291026
al::Vec3f rawDirSub = safeDirForSource(name, kfs, tSub);
10301027
al::Vec3f dirSub = sanitizeDirForLayout(rawDirSub, config.elevationMode);
10311028

1032-
// Convert direction to position for DBAP, use direction for VBAP/LBAP
1029+
// Convert direction to position for DBAP, use direction for LBAP
10331030
al::Vec3f posOrDir = (mActivePannerType == PannerType::DBAP)
10341031
? directionToDBAPPosition(dirSub) : dirSub;
10351032

@@ -1151,17 +1148,15 @@ void SpatialRenderer::renderPerBlock(MultiWavData &out, const RenderConfig &conf
11511148
}
11521149

11531150
// renderSmooth: Direction interpolated within each block using SLERP
1154-
// Note: This mode is DEPRECATED. Only VBAP gains interpolation is implemented.
1151+
// Note: This mode is DEPRECATED and intentionally disabled.
11551152
void SpatialRenderer::renderSmooth(MultiWavData &out, const RenderConfig &config,
11561153
size_t startSample, size_t endSample) {
11571154
int sr = mSpatial.sampleRate;
11581155
int numSpeakers = mLayout.speakers.size();
11591156
int bufferSize = config.blockSize;
11601157
size_t renderSamples = endSample - startSample;
11611158

1162-
// For smooth mode, we need per-sample gain interpolation
1163-
// We compute VBAP gains at block start and end, then interpolate
1164-
// NOTE: This only works properly with VBAP, other panners use block mode internally
1159+
// Smooth mode is retained only as disabled historical implementation context.
11651160
std::vector<float> gainsStart(numSpeakers);
11661161
std::vector<float> gainsEnd(numSpeakers);
11671162
std::vector<float> gainsInterp(numSpeakers);
@@ -1197,9 +1192,7 @@ void SpatialRenderer::renderSmooth(MultiWavData &out, const RenderConfig &config
11971192
al::Vec3f dirStart = sanitizeDirForLayout(rawDirStart, config.elevationMode);
11981193
al::Vec3f dirEnd = sanitizeDirForLayout(rawDirEnd, config.elevationMode);
11991194

1200-
// Compute gains at both ends (VBAP removed - smooth mode disabled)
1201-
// computeVBAPGains(dirStart, gainsStart);
1202-
// computeVBAPGains(dirEnd, gainsEnd);
1195+
// Smooth mode is disabled; retained code path is intentionally inert.
12031196
// Smooth mode is disabled, so this code should not be reached
12041197
assert(false && "Smooth mode should be disabled");
12051198

@@ -1265,8 +1258,7 @@ void SpatialRenderer::renderPerSample(MultiWavData &out, const RenderConfig &con
12651258
// Sanitize direction to fit within speaker layout's representable range
12661259
al::Vec3f dir = sanitizeDirForLayout(rawDir, config.elevationMode);
12671260

1268-
// For per-sample mode, always use VBAP gains (most accurate per-sample)
1269-
// computeVBAPGains(dir, gains);
1261+
// Sample mode is disabled; retained code path is intentionally inert.
12701262
// Sample mode is disabled, so this code should not be reached
12711263
assert(false && "Sample mode should be disabled");
12721264

0 commit comments

Comments
 (0)