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

sacn2

v0.1.0

Published

An improved sacn transmitter for NodeJS

Downloads

6

Readme

sACN2 - Improved sACN Transmitter for Node.js

sACN2 is a modern, efficient, and cross-platform streaming ACN (sACN / ESTA E1.31) transmitter built specifically for Node.js applications. It simplifies the process of sending DMX-over-IP data for lighting control, ensuring consistent performance and easy integration.


Features

  • Cross-platform: Fully supports Windows, Linux, and macOS.
  • Dedicated worker thread: Maintains stable and responsive UDP transmission independent of your main application.
  • Automatic interface selection: Intelligently chooses network interface or allows explicit IP binding.
  • Simple API: Easily integrates into Node.js applications.
  • Efficient packet construction: Minimal overhead and optimal performance even at high frame rates.

Installation

Install using npm:

npm install sacn2

Basic Usage

Here's a quick example to get you started:

import { createTransmitter } from 'sacn2';

// Initialize transmitter for universes 1-4
const sacn = createTransmitter({
  universes: [1, 2, 3, 4],
  interface: 'auto',        // Automatically select network interface
  appName: 'MyLightingApp',
  priority: 100
});

// Send a DMX frame to universe 1
const dmxData = new Uint8Array(512).fill(255); // Full-on DMX
sacn.send(1, dmxData);

// When finished, terminate cleanly
await sacn.close();

Interface Binding Options

The interface option supports three modes:

  • Explicit IP address:

    createTransmitter({ interface: '192.168.1.50' });
  • Automatic selection (default patterns: 10.101.1.x, 10.101.x.x, 192.168.0.x, 192.168.1.x, 192.168.x.x):

    createTransmitter({ interface: 'auto' });
  • Fallback (wildcard):

    createTransmitter(); // Defaults to '0.0.0.0'

Running Tests

To see a visual demonstration, run the rainbow test:

node test/rainbow.js

This outputs smooth rainbow gradients across four universes for testing purposes.


Project Structure

sacn2/
├─ src/
│  ├─ core/
│  │  ├─ packet.js
│  │  └─ byte.js
│  ├─ worker/
│  │  └─ transmitter.worker.js
│  └─ index.js
├─ test/
│  └─ rainbow.js
├─ package.json
└─ README.md

Contributing

Contributions and issues are welcome. Please open an issue or pull request on GitHub:


License

MIT © Peter Milo


Repository

https://github.com/PMLightingDesign/sacn2