npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

sound3fy

v0.1.2

Published

Make D3.js visualizations accessible through sound

Readme

sound3fy 🔊

Make D3.js visualizations accessible through sound

CI Lighthouse License: MIT

▶ Live Demo · Why?

sound3fy adds sonification to D3.js visualizations, making charts accessible to blind and low-vision users. Data values become musical notes—higher values play higher pitches.

Features

  • 🎵 Musical Scales - Pentatonic, major, minor, blues, chromatic
  • 📈 Chart Support - Bar, line (continuous sweep), scatter (2D mapping)
  • ⌨️ Keyboard Navigation - Full control without mouse
  • 🔈 Screen Reader - ARIA live regions announce values
  • 🎯 Hover to Hear - Mouse over any data point

Quick Start

// One line to add sonification
d3.selectAll(".bar").sonify({ pitch: "value" });

Installation

npm install sound3fy

Usage

const sonify = d3.selectAll(".bar")
  .data(data)
  .sonify({
    pitch: {
      field: "value",
      range: [220, 880],
      scale: "pentatonic"
    },
    duration: 200,
    gap: 50
  });

// Control playback
sonify.play();
sonify.pause();
sonify.stop();
sonify.next();
sonify.previous();
sonify.setSpeed(1.5);

Line Charts (Continuous Mode)

d3.selectAll(".dot").sonify({
  pitch: "value",
  mode: "continuous"  // Smooth frequency sweep
});

Scatter Plots (2D Mapping)

d3.selectAll(".dot").sonify({
  chartType: "scatter",
  x: "area",              // X → stereo pan
  pitch: { field: "pop" } // Y → pitch
});

Keyboard Shortcuts

| Key | Action | |-----|--------| | Space | Play/Pause | | | Navigate | | Home End | First/Last | | + - | Speed | | M | Toggle mode | | Esc | Stop |

Options

{
  pitch: { field: "value", range: [220, 880], scale: "pentatonic" },
  volume: { field: null, range: [0.4, 0.7] },
  pan: { range: [-0.7, 0.7] },
  duration: 200,
  gap: 50,
  mode: "discrete",  // or "continuous"
  accessibility: { keyboard: true, announce: true, focus: true, hover: true }
}

Scales

| Scale | Notes | |-------|-------| | pentatonic | Pleasant, no dissonance (default) | | major | Bright | | minor | Serious | | blues | Bluesy | | chromatic | All 12 notes | | continuous | Direct frequency |

Accessibility

Built for WCAG 2.2 compliance:

  • ARIA: role="graphics-symbol", aria-label, aria-live="polite"
  • Keyboard: Full navigation
  • Focus: Visual indicators with high contrast support
  • Reduced Motion: Respects user preferences

Development

git clone https://github.com/IsmaelMartinez/sound3fy.git
cd sound3fy
npm install
npm run dev
npm test

Documentation

Help Wanted

Are you blind or low-vision? Your feedback is invaluable! Please share your experience — does the sonification work for you?

License

MIT


Making data accessible, one sound at a time. 🎵