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

@artnet-bridge/artnet

v0.0.1

Published

ArtNet protocol implementation for ArtNet Bridge

Readme

@artnet-bridge/artnet

Art-Net protocol implementation for Node.js. Zero external dependencies -- uses only node:dgram.

What This Package Does

Implements the Art-Net protocol for sending and receiving DMX data over UDP. Supports the core opcodes needed for DMX bridging:

  • OpOutput (0x5000) -- DMX data
  • OpPoll (0x2000) -- discovery poll
  • OpPollReply (0x2100) -- reply to polls

Packet formats follow the Art-Net specification (reference PDF at docs/art-net.pdf).

ArtNetReceiver

Listens for Art-Net UDP packets and emits typed events.

import { ArtNetReceiver } from "@artnet-bridge/artnet";

const receiver = new ArtNetReceiver({
  bindAddress: "0.0.0.0",  // default
  port: 6454,              // default (Art-Net standard port)
});

receiver.on("dmx", (universe, data) => {
  // universe: 0-based universe number
  // data: Uint8Array of up to 512 DMX channel values
  console.log(`Universe ${universe}: channel 1 = ${data[0]}`);
});

receiver.on("poll", (info) => {
  console.log(`Poll from ${info.address}:${info.port}`);
});

receiver.on("error", (err) => {
  console.error("Receiver error:", err);
});

await receiver.start();

// Later:
await receiver.stop();

Events

| Event | Arguments | Description | |-------|-----------|-------------| | dmx | (universe: number, data: Uint8Array) | DMX data received | | poll | (info: { address, port }) | ArtPoll received | | packet | (packet: ArtNetPacket, rinfo) | Any valid Art-Net packet | | error | (error: Error) | Socket error |

ArtNetSender

Sends Art-Net UDP packets. Useful both as a production component and as a test simulator.

import { ArtNetSender } from "@artnet-bridge/artnet";

const sender = new ArtNetSender({
  targetAddress: "255.255.255.255",  // default (broadcast)
  port: 6454,                        // default
});

// Send DMX data
const dmxData = new Uint8Array(512);
dmxData[0] = 255;  // Channel 1 = full
dmxData[1] = 128;  // Channel 2 = half
sender.sendDmx(0, dmxData);  // universe 0

// Send a poll
sender.sendPoll();

// Clean up
sender.close();

API

| Method | Description | |--------|-------------| | sendDmx(universe, data, sequence?) | Send an OpOutput packet. Sequence 0 = disabled. | | sendPoll() | Send an OpPoll packet | | close() | Close the UDP socket |

Low-Level Packet Functions

For direct packet construction and parsing:

import {
  parsePacket,
  serializeDmxPacket,
  serializePollPacket,
  serializePollReplyPacket,
} from "@artnet-bridge/artnet";

Partial DMX Frames

ArtNet controllers can send partial DMX frames containing anywhere from 2 to 512 channels. The bridge accumulates partial frames per universe -- channels not included in the current frame retain their previous values. This supports both full-frame controllers (always 512 channels) and optimized controllers that only send changed channels.

Protocol Compliance

  • Art-Net header validation ("Art-Net\0")
  • Protocol version field (14)
  • 15-bit Port-Address for universe numbering
  • DMX data length: 2-512 bytes, even-padded per spec

Usage as Test Simulator

ArtNetSender works as a standalone DMX simulator for testing. Point it at localhost or a specific IP to feed test data into an ArtNetReceiver:

const sender = new ArtNetSender({ targetAddress: "127.0.0.1" });
const data = new Uint8Array(512);

// Ramp channel 1 from 0 to 255
for (let i = 0; i <= 255; i++) {
  data[0] = i;
  sender.sendDmx(0, data);
  await new Promise(resolve => setTimeout(resolve, 20));
}

sender.close();