## AI Generative Music — Endless Meditation Compositions

- **Blueprint library:** `AdvancedAudioEngine.getGenerativeMusicLibrary()`
  exposes four professionally curated blueprints (`deep-theta-drift`,
  `luminous-delta-veil`, `celestial-dawn-bloom`, `rainforest-prana-journey`)
  together with instrument families and modal palettes (chakra/elements/mantra
  guidance). Every blueprint carries consciousness targets, tempo and breathing
  ranges, evolution curves, instrumentation roles, motifs, and adaptive
  parameters (breathing/heart-rate sync, binaural support, live
  reharmonisation).
- **Composition scheduler:**
  `AdvancedAudioEngine.scheduleGenerativeComposition(request)` transforms a
  blueprint into a layered performance. It interpolates blueprint evolution
  curves into segment timelines, cycles modal centres, generates deterministic
  events per instrument layer (seeded randomness), and returns
  gain/brightness/texture mixes plus motif-aware events for playback engines.
- **Adaptive modulation:** `modulation` knobs (evolution/brightness/density) and
  `targetBrainwave` influence energy envelopes, modal weighting, intensity, and
  event selection; results surface metrics (`energyEnvelope`, `brightnessTrend`,
  `modalWeighting`, `brainwaveAlignment`, `effectiveDurationSeconds`) alongside
  metadata (modal palette, breath cadence, seed, binaural support).
- **Testing:** Vitest coverage
  (`web/src/lib/__tests__/advanced-audio-engine.test.ts`) validates library
  richness and scheduling behaviour including energy metrics, tonal centre
  distribution, brainwave alignment, and brightness emphasis for sparkle layers
  under high modulation.
