How Autis Buddy Works

Understanding our approach to creating personalized calm for autistic children

Project Overview

Autistic children often experience uncontrollable emotions and heightened hyperactivity, which can disrupt their ability to relax and get adequate sleep. Lack of sleep further exacerbates behavioral and emotional challenges, creating a cycle that is difficult to break.

To address this issue, we've developed a machine learning (ML) model that analyzes the brain waves (EEG data) of autistic children. By extracting meaningful parameters from the EEG signals, the system generates personalized, calming content to help the child transition from a hyperactive state to a calm, restful one.

The personalized content includes:

Custom Soothing Music

Generated dynamically based on EEG-derived parameters, with specific musical notes or chords (e.g., A-sharp, C-sharp) tailored to the child's current brain state.

Accompanying Calming Videos

Stock footage of serene environments such as rain, flowing water, or nature scenes designed to visually complement the music and create an overall calming experience.

Implementation Process

1

EEG Data Analysis

We collect EEG signals from the child using a wearable EEG device and analyze the signals to infer key parameters related to brain activity, such as:

  • Relaxation levels (e.g., alpha and theta wave dominance)
  • Stress or hyperactivity indicators (e.g., beta wave spikes)
  • Arousal states (e.g., imbalances in gamma or frontal alpha waves)

Global Music Parameters

We calculate averages for each type of brainwave to determine the overall state:

avg_alpha
avg_gamma
avg_beta
avg_delta
avg_theta
2

Parameter Mapping to Music Generation

We use the EEG parameters to determine the emotional and activity state of the child, then generate music based on their specific needs:

Tempo

Tempo = 80 - 20 * (avg_beta + avg_gamma) / (avg_alpha + avg_theta + avg_delta + 0.01)

Range: 60–80 beats per minute (bpm). Higher arousal lowers the tempo to slow the music and counteract hyperactivity, while a relaxed profile keeps it closer to 80 bpm for gentle engagement.

Key Selection

Choose based on the highest average wave strength:
  • if avg_delta > others: A minor
  • if avg_theta > others: C major
  • if avg_alpha > others: G major
  • if avg_beta or avg_gamma > others: A minor

The dominant wave reflects the child's baseline state, personalizing the key to their typical brain activity. Different keys evoke different emotional responses to match or counteract the child's state.

3

Per-Interval Note Parameters

These adjust MIDI notes for each EEG interval based on specific wave strengths, ensuring dynamic adaptation:

Pitch (MIDI Note Number)

pitch[i] = 40 + 40 * [(alpha[i] + theta[i] + 0.5 * delta[i]) - (beta[i] + gamma[i])] / 100

Range: 40–80 (C2 to G5). Alpha and theta drive pitch upward as they indicate calm states; arousal waves lower pitch during hyperactivity, promoting relaxation with deeper tones.

Step (Interval Between Notes)

step[i] = 1 + 4 * (1 - (beta[i] + gamma[i]) / (alpha[i] + theta[i] + delta[i] + 0.01))

Range: 1–5 semitones. High arousal reduces the step size for stability and simplicity, while low arousal allows larger, flowing intervals.

Duration (Note Length)

duration[i] = 0.5 + 1.5 * (alpha[i] + theta[i] + delta[i]) / (beta[i] + gamma[i] + 0.01)

Range: 0.5–2.0 seconds. Higher relaxation waves lengthen notes, slowing the music to calm the child, while high arousal shortens durations.

Velocity (MIDI Volume)

velocity[i] = 40 + 40 * (max_alpha / 100)

Range: 40–80. Ties velocity to the child's peak relaxation capacity (max_alpha), personalizing loudness to their strongest calm state.

4

Additional Adjustments

These refinements further personalize the music based on statistical extremes and tendencies:

Pitch Range Adjustment

If max_beta + max_gamma > 60: Shift pitch range to 30–70

Detects if peak arousal exceeds 60%, indicating significant hyperactivity, and lowers the pitch range to emphasize deeper, more grounding tones.

Melodic Contour

If mode_beta or mode_gamma is highest: step[i] = -step[i] (descending)

If the most frequent state is arousal, reverses step direction to create descending melodies that musically "wind down" arousal.

5

Video Integration

Complement the personalized music with appropriate visual content:

  • Select from a library of calming video clips (e.g., nature scenes, slow-moving water)
  • Match the visual tempo and color scheme to the EEG parameters
  • Synchronize visual transitions with musical changes
Ocean Waves
Forest Scenes
Night Sky
Gentle Rain

Why Our Approach Works

Comprehensive Wave Analysis

Every formula includes all five wave types (directly or via ratios), capturing their full influence rather than reducing them to a single index.

Personalization

Global parameters reflect the child's overall EEG profile via averages and maxima, while per-interval parameters adapt to moment-to-moment changes.

Therapeutic Alignment

Lower pitches, smaller steps, and longer durations during high arousal align with music therapy principles to boost alpha/theta and reduce beta/gamma.

Statistical Integration

Maxima adjust intensity, modes influence contour, and averages set the baseline, ensuring a rich, data-driven output.

Ready to Try Autis Buddy?

Upload your EEG data to generate personalized, calming content for your child

Get Started