The framework / 01
A little more intention in every frame.
The Sensory Regulation Framework turns the texture of audiovisual media into measurable, inspectable features.
How it works
From a video to a clearer picture.
The published Calming Index implementation measures visual motion, chromatic load, sound, and pacing. Its open scoring model weighs sensory demand against regulatory capacity to create an explainable profile—not a clinical judgment.
Ingest
Read video and audio streams with FFmpeg / FFprobe.
Extract
Use OpenCV optical flow and color analysis, plus audio feature extraction with Librosa.
Normalize
Map unlike measurements to a shared 0–100 range using documented empirical bounds.
Evaluate
Calculate sensory demand, regulatory capacity, and the final Calming Index.
Explain
Export feature vectors, human-readable reports, sensitivity results, and visualizations.
Design considerations
Four ways to make space for calm.
These are measurable features and creative production goals, not universal safety thresholds.
Acoustic stability
Track RMS loudness and acoustic onset rate to identify sudden intensity changes. Production guidance favors smoother sound and fewer abrupt transients. A 60–80 BPM resting-heartbeat range is a creative pacing reference, not a validated acoustic calibration.
Current model: −60 to −6 dBFS RMS scaling
Luminance & visual change
Inspect brightness and color variation between frames to characterize visual load and avoid unnecessarily erratic changes.
Visual feature: brightness, saturation & variance
Motion & cuts
Use optical flow and edit density to describe on-screen velocity, camera motion, and transition pace.
Reference bounds: 5 px/frame; 0.33 cuts/sec
Recovery & rhythm
Account for stillness, quiet, and gaps between edits. Creative pacing can include four-count breathing cues and moments to pause.
Regulatory features: predictability & recovery
The model
Demand is only half the story.
The model asks not only what a video demands, but what it gives back: predictability, recovery time, and visual harmony. Its weights are empirically initialized baselines, not validated pediatric cutoffs.
Sensory demand
Visual + auditory + temporal + cognitive
Regulatory capacity
Predictability + recovery + visual harmony
Calming Index / 0–100
clamp(50 + 0.5 × (capacity − demand))
Open-source implementation
Follow the code.
Read the architecture and methods, inspect the sample dataset, or run the pipeline yourself. YAMNet sound classification and Whisper transcription are future multimodal extensions, not part of the current implementation.
View repositorygit clone https://github.com/pallavikaran/CalmingIndex.git cd CalmingIndex pip install -r requirements.txt python main.py
FFmpeg and FFprobe are required. See README for setup details.