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

@arcanewizards/artnet

v0.1.4

Published

[![](https://img.shields.io/npm/v/@arcanewizards/artnet)](https://www.npmjs.com/package/@arcanewizards/artnet)

Downloads

656

Readme

@arcanewizards/artnet

Art-Net timecode transport for Node.js applications.

This package exposes a small UDP-based API for sending and receiving Art-Net timecode packets and shares network-target configuration with @arcanewizards/net-utils.

Installation

pnpm add @arcanewizards/artnet

API

createArtnet(config) returns an ArtNet instance with the following contract:

  • connect(): Promise<void> Opens the underlying UDP sockets for the configured mode.
  • sendTimecode(mode, timeMillis): Promise<void> Sends one Art-Net timecode packet. Calling this before connect() rejects. Negative timeMillis values are ignored because Art-Net timecode does not support negative positions.
  • on(event, listener)
  • addListener(event, listener)
  • removeListener(event, listener) Standard event-emitter style listeners.
  • destroy(): void Closes open sockets and emits the destroy event.

Supported events:

  • timecode Fired when a valid inbound Art-Net timecode packet is received.
  • error Fired when the instance encounters a socket or send error.
  • destroy Fired when destroy() is called.

Usage

import { createArtnet } from '@arcanewizards/artnet';

const artnet = createArtnet({
  type: 'interface',
  interface: 'en0',
  mode: 'both',
});

artnet.on('timecode', (event) => {
  console.log(
    `Received ${event.mode} ${event.hours}:${event.minutes}:${event.seconds}:${event.frame} from ${event.host}:${event.port}`,
  );
  console.log(`Position in milliseconds: ${event.timeMillis}`);
});

artnet.on('error', (error) => {
  console.error('Art-Net error', error);
});

await artnet.connect();

const positionMillis = 12_345;

await artnet.sendTimecode('EBU', positionMillis);

artnet.destroy();

In the example above, sendTimecode('EBU', 12_345) encodes the position as 25 fps timecode. A receiving listener will not receive the timecode in the same precision, as it will be decomposed into hours, minutes, seconds and frames.

Timecode Types

ArtNetTimecode

Represents a single Art-Net timecode value:

  • hours: number
  • minutes: number
  • seconds: number
  • frame: number
  • mode: TimecodeMode One of FILM, EBU, DF, or SMPTE.
  • timeMillis: number The same position converted to milliseconds by this package. For non-drop-frame modes this is a direct fps-based conversion. For DF, the package applies drop-frame math when converting between frame fields and milliseconds.

ArtNetTimecodeEvent

Extends ArtNetTimecode with source-network metadata for inbound packets:

  • host: string Source IP address of the packet.
  • port: number Source UDP port of the packet.

That means a timecode listener receives both the interpreted timecode and where it came from on the network, which is useful when monitoring multiple Art-Net sources.

Connection Modes

  • send Broadcasts Art-Net timecode packets.
  • receive Listens for inbound Art-Net timecode packets.
  • both Opens both paths on the same instance.

Targets follow the shared ConnectionConfig shape:

  • { type: 'host', host: '192.168.1.50', port?: number }
  • { type: 'interface', interface: 'en0', port?: number }

When sending through an interface target, the package resolves the interface broadcast address automatically.