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 🙏

© 2026 – Pkg Stats / Ryan Hefner

pixeltone.js

v1.0.7

Published

An auditory creation tool that turns your images into sounds.

Readme

PixeltoneJS — The Auditory Creation Tool

Discord npm Financial Contributors

PixeltoneJS is a JavaScript library that converts images into sound based on their RGB data. By interpreting the colors of the image, the library generates corresponding frequencies to create an audio representation of the image.

Please note that this library is actively evolving. Continuous improvements are imminent. Please check the logs down below;

Features

  • Convert any image to audio
  • Control the frequency ranges for red, green, and blue channels
  • Output audio in WAV format
  • Highly customizable options for fine-tuning the audio output

Installation

To install PixeltoneJS as an npm package, run:

npm install pixeltone.js

Usage

After installing, you can import and use PixeltoneJS in your project:

Example ESModule usage

import { Pixeltone } from 'pixeltone.js';
const pixeltone = new Pixeltone();
pixeltone.createAudioFromImage({ inputImagePath: 'input.png', outputAudioPath: 'output.wav' });

Example CommonJS usage

const { Pixeltone } = require('pixeltone.js');
const pixeltone = new Pixeltone();
pixeltone.createAudioFromImage({ inputImagePath: 'input.png', outputAudioPath: 'output.wav' });

Options

  • inputImagePath: Path to the input image (e.g., ./images/my-image.png).
  • outputAudioPath: Path to save the output audio file (e.g., ./output/audio.wav).
  • sampleRate: Optional, the sample rate for audio. Defaults to 44100.
  • duration: Optional, the duration of each pixel's audio. Defaults to 0.01 seconds.
  • rgbFrequencyRanges: Optional, frequency ranges for the red, green, and blue color channels. See below for default values:
{ r: { min: 30, max: 500, offset: 60 }, g: { min: 500, max: 2000, offset: 250 }, b: { min: 2000, max: 10000, offset: 1000 } }

Change Logs

1.0.0:

  • Major codebase improvement.
  • Transitioned to an object-oriented approach for better scalability and extensibility.
  • For future planned: Allows users to maintain state and extend functionality through the Pixeltone class.

Migration Guide from pre v0.1.1 to v1.0:

  • Replace processSound function imports with Pixeltone class imports.
  • Instantiate a new Pixeltone object using new Pixeltone().
  • Replace processSound calls with pixeltone.createAudioFromImage().
Previous API
import { processSound } from 'pixeltone.js';
processSound({ inputImagePath: 'input.png', outputAudioPath: 'output.wav' });
New API
import { Pixeltone } from 'pixeltone.js';
const pixeltone = new Pixeltone();
pixeltone.createAudioFromImage({ inputImagePath: 'input.png', outputAudioPath: 'output.wav' });

Example Result

Example result of the image down below.


Link to Soundcloud

License

Copyright (c) 2024 Mehmet Ergin Turk

Licensed under the MIT license. See the LICENSE file for details.

(Twitter/x: @papa_alpha_papa),

(Mastodon: @papa_alpha_papa)

(Bluesky: @erginturk.bsky.social)


🌟 Love PixeltoneJS? Contribute, leave feedback, or star our GitHub repo to show your support! 🎶🎨

📣 Join the conversation in our Discord channel and connect with the community! 🎶🎨