MAGF Scanner 2

Static README snapshot; an interactive deployment can be added later.

MAGF Scanner 2 - Acoustic Room Imaging System

A progressive CMake project that uses all available microphones and speakers to render a 3D density field/gaussian splats in realtime of acoustic reflections for room geometry, voids behind walls, and internal structures.

Concept

The system emits orthogonal random noise through speakers and captures the reflections via microphones. By using pseudo-random noise sequences instead of impulses, we can:

Progressive Apps

The project is structured as a series of increasingly complex applications:

| App | Purpose |

|-----|---------|

| `01_device_discovery` | Test which mics can hear which speakers |

| `02_clock_sync` | Measure sampling offsets in PPM and stability at 192kHz/24bit |

| `03_frequency_response` | Measure frequency response with band-limited sweep and calibration |

| `04_impulse_response` | Realtime impulse response viewer with configurable convolution window |

| `05_room_simulator` | Simulated room impulse response for deep NN training data |

| `06_distance_solver` | Render solved distances between mics and speakers from first peak |

| `07_probability_field` | Render sum of predicted probability field based on distances |

| `08_density_renderer` | Full 3D density field/gaussian splat rendering |

| `09_magnetic_check_24bit` | Verify 24-bit audio precision across all input devices |

| `10_magnetic_scanner` | Distributed magnetic field scanner node (ELF/VLF 0-96kHz) |

| `11_magnetic_server` | Central server for coordinating scanner nodes and stitching data |

| `12_graphics_test` | Graphics test app with point cloud, live graph, 3D lines, and UI |

| `13_sine_sweep_fr` | Interactive sine sweep frequency response measurement tool (Farina method) |

Technical Details

Signal Processing Pipeline

1. Generate orthogonal pseudo-random noise (MLS, Golay, or chirp sequences)

2. Play through speaker at maximum supported sample rate (target: 192kHz/24bit)

3. Capture via microphones, correcting for clock drift between devices

4. Cross-correlate/Deconvolve output/input to extract impulse response (Band-limited with Tukey window)

5. Accumulate multiple captures to improve SNR

- **App 03** specific: Includes calibration pre-check for levels and clipping detection.

6. Time-of-flight analysis to estimate distances

7. Multilateration to solve 3D positions

Requirements

Building

mkdir build && cd build
cmake ..
cmake --build . --config Release

Dependencies

All dependencies are fetched automatically via CMake FetchContent:

**Audio:**

**Graphics:** (used by apps 04, 06, 07, 08, 10, 11, 12)

See [common/include/graphics/](common/include/graphics/) for the graphics library API.

License

MIT License