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

@djodjonx/x32-simulator

v0.0.7

Published

X32 Simulator

Downloads

689

Readme

X32 Digital Mixer Simulator

npm version License: MIT

A fully functional Behringer X32 / Midas M32 OSC Simulator.

This tool allows developers to build, test, and debug X32/M32 remote control applications without needing physical hardware. It accurately replicates the mixer's state management, OSC protocol quirks, and network behavior.


🚀 Features

  • Complete State Simulation: Simulates ~4000+ OSC parameters including Channels, Buses, Matrices, FX, Routing, and Config.
  • Accurate OSC Protocol: Supports node-osc based communication over UDP.
  • Subscription Management: Handles /xremote, /subscribe, and /renew logic for client updates.
  • Meter Simulation: Generates synthetic meter data for /meters/0 through /meters/15 endpoints.
  • Dual Mode: Run as a Standalone CLI Server or embed as a Library in your Node.js tests.
  • Zero Dependencies (runtime): The published package bundles everything needed.

📦 Installation

As a CLI Tool (Global)

Install globally to run the simulator from anywhere in your terminal.

npm install -g @djodjonx/x32-simulator

As a Library (Local)

Install in your project to use it in integration tests.

npm install --save-dev @djodjonx/x32-simulator

🖥️ CLI Usage

Start the simulator server:

x32-simulator

Options

| Flag | Alias | Description | Default | |------|-------|-------------|---------| | --port | -p | UDP Port to listen on | 10023 | | --host | -h | IP Address to bind to | 0.0.0.0 |

Example:

x32-simulator --port 5000 --host 127.0.0.1

🌐 Network Setup (IP Aliasing)

If you need to simulate a specific console IP (e.g., 192.168.1.100) that is not assigned to your machine, you must create a Network Alias. This allows the simulator to "own" that IP locally.

| OS | Create Alias Command | Remove Alias Command | |----|----------------------|----------------------| | macOS | sudo ifconfig lo0 alias <IP> | sudo ifconfig lo0 -alias <IP> | | Linux | sudo ip addr add <IP>/32 dev lo | sudo ip addr del <IP>/32 dev lo | | Windows | netsh interface ip add address "Loopback" <IP> 255.255.255.255 | netsh interface ip delete address "Loopback" <IP> |

Note (Windows): Requires the "Microsoft Loopback Adapter" to be installed and named "Loopback" in your Network Connections.

Interactive Commands

Once running, the CLI accepts these commands:

  • reset: Resets all faders and parameters to default values.
  • stop / exit: Shuts down the server.

📚 Library Usage

Perfect for integration testing your X32 client apps.

import { SimulationService, UdpNetworkGateway, ConsoleLogger, InMemoryStateRepository, SchemaFactory, SchemaRegistry, OscCodec } from '@djodjonx/x32-simulator';

// 1. Setup Dependencies
const logger = ConsoleLogger.getInstance();
const schemaRegistry = new SchemaRegistry(new SchemaFactory());
const codec = new OscCodec(schemaRegistry);
const gateway = new UdpNetworkGateway(logger, codec);
const repository = new InMemoryStateRepository(logger, schemaRegistry);

// 2. Initialize Service
const simulator = new SimulationService(
  gateway,
  logger,
  repository,
  schemaRegistry,
  10023,       // Port
  '127.0.0.1'  // Host
);

// 3. Start & Stop
await simulator.start();
console.log('Simulator running...');

// ... run your tests ...

await simulator.stop();

Available Exports

The library exports the following components for advanced usage:

Core Services

  • SimulationService: Main entry point.
  • SchemaRegistry: Manages the OSC node definitions.
  • SchemaFactory: Generates the default X32 schema.

Domain Entities & Models

  • X32State: The "Digital Twin" state container.
  • SubscriptionManager: Manages /xremote and /subscribe clients.
  • X32Address: Helper for parsing OSC paths.
  • OscMessage: Wrapper for parsed OSC messages.
  • MeterData: Helper for handling meter blobs.
  • X32Node: Represents a single parameter (type, default value).

Infrastructure

  • UdpNetworkGateway: Default UDP implementation.
  • ConsoleLogger: Default logger implementation.
  • OscCodec: Encodes/Decodes X32-specific OSC packets.
  • InMemoryStateRepository: Default state storage.

Types & Interfaces

  • INetworkGateway, ILogger, IStateRepository
  • OscPacket, OscMsg, RemoteClient
  • LogCategory

🎛️ Simulated OSC Map

The simulator covers a vast majority of the X32 OSC command set:

| Category | OSC Path Pattern | Description | |----------|------------------|-------------| | Channels | /ch/{01..32}/... | Config, Preamp, Gate, Dyn, EQ, Mix, Sends | | Buses | /bus/{01..16}/... | Config, Dyn, EQ, Mix, Sends | | DCA | /dca/{1..8}/... | Config, Fader, Mute | | Matrix | /mtx/{01..06}/... | Config, Dyn, EQ, Mix | | Aux In | /auxin/{01..08}/... | Config, Preamp, EQ, Mix | | FX Returns | /fxrtn/{01..08}/... | Config, EQ, Mix | | Effects | /fx/{1..8}/... | Type, Parameters, Source | | Headamps | /headamp/{000..127}/... | Gain, Phantom Power | | Routing | /config/routing/... | Input, Output, Card, AES50 Routing | | Status | /-stat/... | Selected Channel, Sends on Fader, Screen State | | Meters | /meters/... | Meter data blobs (simulated noise) |


🧪 Testing Example (E2E)

The simulator is ideal for testing broadcast behavior and multi-client synchronization. When one client changes a parameter, the simulator automatically broadcasts that update to all other clients subscribed via /xremote.

You can find a complete, runnable example of this in examples/dual-client-e2e.ts.

Multi-Client Sync Test Snippet

// Client A and Client B both subscribe to /xremote
clientA.send('/xremote');
clientB.send('/xremote');

// Client A changes a fader
clientA.send('/ch/01/mix/fader', 0.85);

// Result: BOTH Client A and Client B receive the update from the simulator
// This ensures your UI stays in sync across multiple devices.

🤝 Contributing

We welcome contributions! Please see INSTALL.md for development instructions.

📄 License

MIT © Jonathan Moutier