## Multi-Layered Mantra Engine — Integration Notes

- **Library access:** `AdvancedAudioEngine.getMantraLibrary()` exposes 12
  curated presets spanning Sanskrit, Tibetan, Latin, and Shinto traditions with
  tone centres, tempo envelopes, polyrhythms, and drone metadata. Each preset
  surfaces layered chant structures (lead, response, harmony, drone) for UI
  selectors or SDK tooling.
- **Sequencing helper:** `AdvancedAudioEngine.scheduleMantraChant(request)`
  returns cycle timing, phrase breakdowns, overtone mix recommendations, breath
  cues, and performance metrics. The engine clamps requested BPM into the
  preset’s validated range and normalises dynamics based on `dynamicIntensity`.
- **Responsive behaviour:** `callAndResponse: false` collapses the response
  delay while keeping harmonic balance; dynamic intents influence output gain,
  swing, and the `overallEnergy/brightness/coherence` telemetry for adaptive UX
  cues.
- **Testing:** Behaviour locked via Vitest
  (`web/src/lib/__tests__/advanced-audio-engine.test.ts`) covering library
  integrity, cycle orchestration, and intent-driven modulation to guarantee
  deterministic sequencing in downstream clients.
