AetherSynth & Flow
Multi-platform Apple ecosystem spatial audio synthesizer (iOS 18, watchOS 11, visionOS 2, macOS 15, AUv3) with HealthKit RR-interval Lomb-Scargle HRV spectral analysis, 4-channel BLE EEG BCI, 2D/3D FDTD PML physical waveguides, Quantum MPS/DMRG harmonic optimization, and CoreML/MPSGraph closed-loop brainwave entrainment in Swift 6 and Metal.
- Period
- November 2026
- Release
- v1.0.0 (Public source)
- Work type
- Independent open-source project
- Development
- AI-assisted, with verification
What I built
An offline-first Swift 6 and Metal codebase spanning six XcodeGen targets (AetherSynthFlow iOS 18, AetherSynthWidgets ActivityKit/WidgetKit, AetherSynthWatch watchOS 11, AetherSynthVision visionOS 2, AetherSynthMac macOS 15, and AetherSynthAUv3 Audio Unit extension) across 63 source files (46,959 LOC) with zero external package dependencies and strict concurrency (SWIFT_STRICT_CONCURRENCY = complete).
The audio engine runs a wait-free AVAudioSourceNode procedural synthesizer combining stereo binaural beats, a 4-operator through-zero FM (TZFM) & harmonic morphing engine, Paul Kellet 7-pole pink noise, 24 dB/oct Cytomic TPT SVF filtering, an 8-line Hadamard feedback delay network (FDN) spatial reverb with mutually prime delay lines and all-pass diffusers, an offline 48 kHz 24-bit PCM / 32-bit IEEE Float RIFF/WAVE stem renderer (OfflineStemExporter), a parametric anthropometric KEMAR 128-tap HRIR synthesizer (KEMARHRIRSynthesizer modeling Woodworth-Schlosberg diffraction ITD, 4th-order Thiran fractional delay, Brown & Duda spherical head-shadow ILD, and a 4-stage pinna spectral notch cascade) coupled with an allocation-free Uniformly Partitioned Overlap-Save (UPOLS) Radix-2 FFT convolver (PartitionedOverlapSaveConvolver with dual-path raised-cosine crossfade) and an Allen & Berkley 18-source 3D Shoebox Image-Source early reflection solver (ShoeboxRoomSimulator + OrbitalHabitSpatializer), a 2D/3D Finite-Difference Time-Domain (FDTD) visco-thermal physical waveguide & nonlinear Chladni plate resonator with cubic Perfectly Matched Layer (PML) absorbing boundaries (FDTDWaveguideSolver + aetherStepFDTDWavefield), GPU Metal hardware ray-traced 3D acoustics (MetalAcousticRayTracer + aetherTraceAcousticRays tracing 4,096 Fibonacci-sphere rays across 16 bounces and 4 octave bands into a 512-tap Linkwitz-Riley/KEMAR stereo DRIR with CPU SIMD SAH-BVH Möller–Trumbore fallback), a 1D Rectified-Flow ODE latent diffusion soundscape engine (NeuralLatentSoundscapeEngine with 4-step Heun predictor-corrector, FiLM conditioning, 4-stage Residual Vector Quantizer 4×64×ℝ¹⁶, and 64× Snake-activated 1D transposed-conv neural vocoder), a native Audio Unit v3 DAW Instrument & Effect plugin extension (AetherSynthAudioUnit supporting sample-accurate internalRenderBlock sub-block event slicing, a 16-parameter lock-free Synchronization.Atomic<UInt32> RealtimeParameterBank, and an 8-voice MIDI/MPE MPEPolyphonicVoiceBank with ±48-semitone pitch bend, channel pressure aftertouch, CC74 slide, and 2.5 ms raised-cosine voice stealing), and a sub-millisecond Distributed Multi-Peer Spatial Orchestra engine (DistributedOrchestraEngine combining a 64-byte 4-timestamp PTP/NTP OrchestraPTPClockPacket wire protocol, MarzulloClockFilter W=16 fault-tolerant interval intersection + IEEE 1139 Allan deviation, a critically damped 2nd-order PI-PLL sample-rate servo PhaseLockedLoopClockServo, and a 2.5D Rayleigh I Wave-Field Synthesis solver SpatialWaveFieldSolver with a 4-point 3rd-order Lagrange fractional Time-of-Flight delay line). On the graphics, neuro-feedback, and quantum optimization side, the app integrates a 64-step sphere-traced 3D Signed Distance Field (SDF) Metal raymarcher (OrbitalSDFCoreView + aetherRaymarchedCore), a 380–780 nm Sellmeier glass-dispersion chromatic photon-splatting caustics & Henyey-Greenstein volumetric God-rays solver (SpectralCausticsRenderer + VolumetricCausticsKernels.metal), a 2D Linear Kalman Focus State Estimator & 4-phase cubic Hermite circadian entrainment scheduler (CognitiveEntrainmentEngine), a zero-knowledge Bonjour LAN P2P mesh sync actor using ephemeral Curve25519 ECDH + HKDF-SHA256 + ChaChaPoly E2EE and Lamport clocks (AetherMeshSyncActor), a 4-channel 256 Hz BLE EEG Brain-Computer Interface (EEGBrainComputerInterface with Recursive Least Squares ocular artifact cancellation, higher-order Bispectrum B(f₁,f₂) & Bispectral Index BIS, Tort KL-divergence Theta-Gamma Phase-Amplitude Coupling MI, and Individual Alpha Frequency sub-harmonic phase locking), a Smoothed Pseudo Wigner-Ville Distribution (SPWVD) & Ensemble Empirical Mode Decomposition Hilbert-Huang Transform time-frequency analyzer (WignerVilleHilbertHuangAnalyzer), and a 6-site Quantum Matrix Product State (MPS) tensor network with a 2-site Density Matrix Renormalization Group (DMRG) ground-state solver and von Neumann entanglement entropy S_vN = −Tr(ρ_A ln ρ_A) harmonic voice allocator (TensorNetworkQuantumOptimizer). On visionOS 2, AetherVisionApp pairs a 0.85 m³ RealityKit 3D Keplerian orbital volume (VolumetricOrbitalRealityView) and 90 Hz ARKit bimanual hand tracking (BimanualHandTrackingActor + pure-SIMD SpatialPoseTelemeter) with a 90 Hz CompositorServices stereoscopic LayerRenderer driving a double-buffered 16,384-particle 3D curl-noise Metal compute kernel (aetherCurlNoiseParticleKernel). On macOS 15 Sequoia, AetherMacApp provides a 3-column desktop studio, native MenuBarExtra live waveform/countdown, a borderless always-on-top floating NSPanel HUD (FloatingOrbitalHUDController), and a zero-dependency CoreAudio HAL hot-plug output router (CoreAudioDeviceManager). On watchOS 11, WatchHealthKitBiometricEngine streams beat-to-beat RR intervals into an uneven-grid Lomb-Scargle periodogram evaluator (0.04–0.15 Hz baroreflex LF and 0.15–0.40 Hz vagal HF bands) across a 64-bit FNV-1a WatchConnectivity binary bridge, feeding both an on-device CoreML [1, 12] 3-layer SIMD MLP + PID controller and a GPU MetalPerformanceShadersGraph reverse-mode autodiff temporal self-attention trainer (MPSGraphBrainwaveTrainer with in-graph Smooth-L1 loss, global L2 gradient clipping ‖∇L‖₂ ≤ 1.0, and compiled MPSGraphExecutable AdamW updates).
What was checked
Verified across 63 Swift 6 and Metal source files (34 @Test suites + 12-stage deterministic AetherCapstoneBenchmarkSuite with SHA-256 cryptographic proof): RealtimeFDTDResonatorKernel enforced the 2D/3D Von Neumann CFL stability bound λ² + 4μ² ≤ 1/D − 2σ₁Δt/h² across 4,096 steps with zero divergence and 38.94 dB (> 35 dB) cubic PML boundary reflection attenuation vs. rigid Dirichlet walls; EEGArtifactFilterBank (4-tap RLS λ_rls = 0.992 + Kalman subtractor) attenuated synthetic ±250 µV FP1/FP2/AF7/AF8 ocular blink artifacts by 30.31 dB (> 30 dB) while preserving a 10.0 Hz occipital alpha carrier (r > 0.96, phase shift 2.31° < 5°), EEGBLEPacketDecoder verified lossless 12-bit & 24-bit BLE GATT packet decoding with sequence-drop linear interpolation, CorticalSpectralAnalyzer / BispectralAnalyzer isolated quadratic phase coupling f₃ = f₁ + f₂ with squared bicoherence b²(6 Hz, 10 Hz) = 0.9992 (> 0.85) vs. 0.0365 (< 0.15) on uncoupled random-phase controls, and PhaseAmplitudeCouplingEstimator discriminated 18-bin Tort KL-divergence Theta-Gamma coupling (MI = 0.0493 > 0.015 vs. 0.000069 < 0.001, 712× contrast); WignerVilleDistributionEngine + HilbertHuangAnalyzer achieved > 6.0 dB cross-term suppression via separable Doppler-lag smoothing while resolving a linear FM chirp ridge within < 1.5 Hz RMSE and decomposing composite 6 Hz + 22 Hz waves into orthogonal IMFs (|⟨c₁, c₂⟩| < 0.10); MatrixProductState + DMRGHarmonicSolver verified exact canonical trace normalization ⟨ψ|ψ⟩ = 1.0 ± 10⁻⁹, variational ground-state energy lowering across 4 two-site DMRG sweeps with truncation error < 10⁻⁵, and analytical maximally entangled Bell/GHZ von Neumann entropy S_vN = ln(8) ≈ 2.07944154 ± 10⁻⁵; SellmeierDispersionMaterial verified strictly monotonic normal dispersion n(380 nm) > n(550 nm) > n(780 nm) across Crown BK7, Dense Flint SF10, Fused Quartz, and Diamond lattices alongside Henyey-Greenstein phase normalization 2π ∫₀^π Φ_HG(cos θ) sin θ dθ = 1.0 ± 10⁻³; HadamardFDNReverb + OfflineStemExporter verified monotonic RT60 decay and byte-exact 48 kHz 24-bit PCM / 32-bit IEEE Float RIFF/WAVE binary headers; FocusStateKalmanFilter + AetherMeshSyncActor verified covariance contraction, C¹ cubic Hermite entrainment spline continuity, and zero-tamper Curve25519 + ChaChaPoly E2EE wire round-trips; MarzulloClockFilter (W=16 sliding window with 13 valid +1.25 ms PTP exchanges and 3 corrupted +45.0 ms Byzantine Wi-Fi aggregation outliers) recovered the consensus offset at 1.2545 ms (0.0045 ms error ≤ 0.08 ms) while rejecting all 3/16 outliers; PhaseLockedLoopClockServo converged two ProceduralSynthKernel instances from a +12.5 ms initial offset and +40 ppm crystal drift to < 0.001 ms (< 0.15 ms) steady-state error within 200 PTP ticks without overshoot; SpatialWaveFieldSolver equalized total wavefront arrival times d_i/c + τ_{wfs,i} across a 4-node speaker array at the listener sweet spot within 1.73 × 10⁻¹⁸ s (< 10⁻⁹ s); AetherSynthAudioUnit + MPEPolyphonicVoiceBank verified sample-accurate 512-frame sub-block slicing (MIDI Note On at frame 128 with < 10⁻⁶ pre-note silence, linear filterCutoffHz parameter ramp 1,200 → 3,000 → 4,800 Hz across frames 128..384, and 9-note MPE oldest-released voice stealing with zero clipping/NaN spikes); KEMARHRIRSynthesizer + PartitionedOverlapSaveConvolver verified median-plane symmetry (ITD(0°, φ) = 0, ‖h_L − h_R‖₂ < 10⁻⁶), lateralized Woodworth-Schlosberg ITD at θ = +90° (0.656 ms / 31.5 samples at 48 kHz with > 6.0 dB contralateral head-shadow attenuation above 5 kHz), monotonic pinna spectral notch upward shift from −30° to +60° elevation, and UPOLS FFT vs. direct O(N·M) time-domain convolution equivalence within < 10⁻⁴ max error across 4,096 samples; ShoeboxRoomSimulator verified 18 virtual image sources (6 first-order + 12 second-order edge) with strictly monotonic reflection energy across Anechoic Chamber < Obsidian Studio < Glass Conservatory < Cathedral Vault; MPSGraphBrainwaveTrainer verified > 65% Smooth-L1 loss reduction across 50 epochs on [Batch = 8, T = 8, D = 12] trajectories with clipped L2 gradient norms (‖∇L‖₂ ≤ 1.0); SpatialPoseTelemeter verified continuous logarithmic bimanual pinch sweeps ([0.005 m, 0.12 m] → [1.5 Hz, 40.0 Hz] binaural beat & [120 Hz, 12,000 Hz] Cytomic SVF cutoff), Schmitt-trigger pinch hysteresis (18 mm engage / 28 mm release), and quaternion wrist-roll resonance extraction; ProceduralMeshGenerator verified watertight 42-vertex / 80-triangle geodesic icosahedron and (3,5) Keplerian torus-knot manifold topologies; MetalAcousticRayTracer + AcousticSAHBVH verified Möller–Trumbore ray-triangle intersections within 10⁻⁶ m and monotonic 4-band RT60 decay across Velvet Diffuser vs. Obsidian Marble chambers; ResidualVectorQuantizer + SnakeNeuralVocoder verified strict 4-stage residual norm reduction (‖r₄‖₂ < ‖r₃‖₂ < ‖r₂‖₂ < ‖r₁‖₂ < ‖z‖₂), lossless 284-byte FNV-1a token serialization, exact 4,096-sample 64× Snake upsampling, and unity-power Hann overlap-add (w²[n] + w²[n + N/2] = 1.0 ± 10⁻⁶); and ProceduralSynthKernel + SpectralFFTAnalyzer verified zero-NaN multi-sample-rate synthesis across 44.1 kHz, 48 kHz, and 96 kHz. On a 110-beat synthetic 0.10 Hz Mayer-wave RR series, the Lomb-Scargle analyzer recovered the exact 0.1000 Hz resonance peak (SDNN = 81.40 ms, RMSSD = 42.89 ms, pNN50 = 36.70%, LF/HF = 58.80, RSA coherence = 0.9916). Across 40 epochs of online Huber-loss backpropagation, the 12-to-5 SIMD MLP reduced prediction loss monotonically from 0.089010 to 0.006432 (92.8% reduction), while the 45-step closed-loop PID simulation slewed binaural frequency from 14.0 Hz down to 6.76 Hz and raised vagal coherence to 0.9523.
vanovri/aether-synth-flow.Verification date: 8 November 2026. Static concurrency/type audits and numerical reference tests verify the included DSP, 2D/3D FDTD PML waveguide, 4-Ch BLE EEG BCI (RLS/BIS/PAC), SPWVD/EEMD, Quantum MPS/DMRG, Sellmeier caustics, AUv3 MPE, PTP/Marzullo/PI-PLL WFS orchestra, 6-DoF spatial telemetry, SAH-BVH acoustic ray-tracing, RVQ/Snake neural vocoder, Lomb-Scargle, and MLP algorithms on synthetic fixtures.
What this demonstrates
Demonstrates multi-target Swift 6 concurrency, lock-free real-time audio synthesis, physical FDTD acoustic waveguides, tensor-network quantum optimization, uneven-grid Lomb-Scargle and Wigner-Ville/HHT time-frequency analysis, and online neural weight adaptation on synthetic cardiorespiratory and cortical EEG benchmarks. Passing deterministic simulation tests does not establish clinical medical-device accuracy or physical Apple Watch / BLE EEG hardware validation.
All projects