Skip to main content

Audio Representation (Sonification)

Sonification transforms chart data into audio, making data accessible to users with visual impairments and providing an alternative way to explore data patterns through sound.

Overview

The Sonification module (from ts/Extensions/Sonification/Sonification.ts:94-109) enables you to:
  • Convert data points to musical notes
  • Map data values to audio parameters (pitch, volume, duration)
  • Create audio earcons (notification sounds)
  • Navigate charts using audio cues
  • Make data accessible through sound

Setup

The sonification module is included in the accessibility module:

Basic Sonification

Enable Sonification

Play Chart as Audio

From the Sonification API (ts/Extensions/Sonification/Sonification.ts:63-90):

Play Individual Series

Audio Mapping

Pitch Mapping

Map data values to musical pitches:

Volume Mapping

Duration and Timing

Instruments and Sounds

Available Instruments

Highcharts includes several preset instruments:

Custom Instruments

Define custom synthesizer patches:

Advanced Features

Earcons (Audio Notifications)

From the earcon demo (samples/highcharts/sonification/chart-earcon/demo.js:11-42):

Multiple Tracks

Create multiple simultaneous audio tracks:

Context Track Mapping

Map audio parameters based on context:

Sonification Events (from ts/Extensions/Sonification/Sonification.ts:14-21)

Interactive Controls

Create playback controls for users:

Scrubbing Navigation

Allow users to scrub through the chart (from ts/Extensions/Sonification/Sonification.ts:183-200):

Accessibility Integration

Combine sonification with accessibility features:

Best Practices

Sonification Design Tips
  • Use appropriate pitch ranges (avoid extremes)
  • Keep duration reasonable (5-15 seconds for most charts)
  • Provide play/pause controls
  • Show visual feedback during playback
  • Use earcons sparingly for important events
  • Test with headphones and speakers
  • Consider users with hearing impairments
  • Provide alternative text descriptions
  • Use familiar instruments for better understanding
Important Considerations
  • Browser audio support varies (test across browsers)
  • Audio may not autoplay due to browser policies
  • Requires user interaction to start in most browsers
  • Can be CPU intensive for large datasets
  • May not work properly in all screen readers
  • Consider providing mute option
  • Loud or jarring sounds can be startling

Complete Example