EMOTIVE: A Closed-Loop Affective Narrative System (CLANS) Using In-Browser Facial Blendshapes and Procedural Soundscapes
Interactive storytelling systems powered by Large Language Models (LLMs) predominantly operate as unidirectional generation pipelines: the reader passively consumes text, or intermittently intervenes via explicit choice trees. In this paper, we present EMOTIVE, a zero-install, privacy-preserving Closed-Loop Affective Narrative System (CLANS) that continuously and unobtrusively modulates narrative trajectory, dramatic counterpoint, and multi-layered procedural soundscapes based on real-time involuntary facial micro-expressions.Operating entirely client-side within a sandboxed WebAssembly runtime, EMOTIVE tracks 52 Facial Action Coding System (FACS) blendshapes at ~10 Hz using MediaPipe FaceLandmarker without transmitting video frames, pixel data, or biometric templates to any server. To eliminate camera flicker, involuntary blinks, and micro-expressions from causing narrative instability, we implement an Exponential Moving Average (EMA) filter (alpha = 0.22) paired with a state hysteresis barrier (delta = 0.09).Rather than employing simplistic emotional mirroring, the narrative controller adopts Psychological Counterpoint, dynamically enriching prose with dramatic irony, bittersweet subversion, or suspenseful thresholds. In parallel, a procedural Web Audio synthesizer modulates 4-voice harmonic ambient pads and resonant biquad filters without external audio assets.We detail the mathematical signal pipeline, narrative prompt structuring, zero-biometrics privacy architecture, and an empirical telemetry protocol measuring reading dwell pace (WPM), transition stability, and post-reading Likert evaluations.Open-source implementation and interactive live demonstration: • GitHub: https://github.com/iamnih4l/Emotive • Live Web Application: https://emotive-omega.vercel.app/
Authors
- Mohammed Nihal
Publication Details
- Journal
- Figshare
- Published
- 2026-11-01
- DOI
- https://doi.org/10.6084/m9.figshare.34880637
- Primary Topic
- Artificial Intelligence in Games
- Type
- preprint