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

steelseries-sonar-js

v1.0.3

Published

A Node.js interface for the SteelSeries Sonar API.

Downloads

27

Readme

SteelSeries Sonar Node.js API

NPM version NPM downloads

Overview

This Node.js package provides a convenient interface for interacting with the SteelSeries Sonar application API. The Sonar application allows users to control and display volumes for various audio channels. This is a TypeScript/JavaScript conversion of the original Python package steelseries-sonar-py.

Installation

To use this package, follow these steps:

  1. Install the package using npm:

    npm install steelseries-sonar-js
  2. Import the Sonar class in your TypeScript/JavaScript file:

    import { Sonar } from 'steelseries-sonar-js';

Usage

Initializing the Sonar Object

The Sonar class is initialized using a static async method init(). It accepts an optional options object with two properties: streamerMode: Set to true to use streamer mode (default is false). appDataPath: Specify a custom path for the SteelSeries Engine 3 coreProps.json file. The default path for the current OS is used automatically.

import { Sonar } from 'steelseries-sonar-js';

async function main() {
    // Initialize with default settings
    const sonar = await Sonar.init();

    // or with custom options
    const sonarWithOptions = await Sonar.init({
        appDataPath: "C:\path\to\coreProps.json",
        streamerMode: true
    });
}

main();

Streamer Mode

The SteelSeries Sonar API supports a streamer mode, which allows users to manage two separate sliders: streaming and monitoring.

To check if streamer mode is enabled:

const isStreaming = sonar.isStreamerMode();
console.log("Is Streamer Mode:", isStreaming);

To enable or disable streamer mode:

// Enable streamer mode
await sonar.setStreamerMode(true);

// Disable streamer mode
await sonar.setStreamerMode(false);

Retrieving Volume Information

Retrieve information about the current volume settings for all channels:

const volumeData = await sonar.getVolumeData();
console.log(volumeData);

Setting Volume for a Channel

Set the volume for a specific channel. The channel parameter should be one of the following: master, game, chatRender, media, aux, chatCapture. The volume parameter should be a number between 0 and 1. An optional streamerSlider can be provided, with values "streaming" (default) or "monitoring".

import { Channel, StreamerSlider } from 'steelseries-sonar-js';

const channel: Channel = "master";
const volume = 0.75;
const streamerSlider: StreamerSlider = "streaming"; // or "monitoring"

const result = await sonar.setVolume(channel, volume, streamerSlider);
console.log(result);

Muting/Unmuting a Channel

Toggle mute status for a specific channel. The muted parameter should be a boolean.

const channel: Channel = "game";
const muted = true;
const streamerSlider: StreamerSlider = "monitoring";

const result = await sonar.muteChannel(channel, muted, streamerSlider);
console.log(result);

Chatmix

Retrieve chat-mix data:

const chatmixData = await sonar.getChatMixData();
console.log(chatmixData);

Set chat-mix value between -1 and 1 to focus sound from the game or chatRender channel:

const result = await sonar.setChatMix(0.5);
console.log(result);

Exceptions

The package exports a set of custom error classes that might be thrown. It is advisable to handle these exceptions in your code. You can import them from steelseries-sonar-js/dist/exceptions.js.

  • EnginePathNotFoundError: Raised when SteelSeries Engine 3 is not installed or the coreProps.json file cannot be found.
  • ServerNotAccessibleError: Raised when the SteelSeries server is not accessible. Provides the HTTP status code.
  • SonarNotEnabledError: Raised when SteelSeries Sonar is not enabled.
  • ServerNotReadyError: Raised when SteelSeries Sonar is not ready.
  • ServerNotRunningError: Raised when SteelSeries Sonar is not running.
  • WebServerAddressNotFoundError: Raised when the web server address is not found.
  • ChannelNotFoundError: Raised when the specified channel is not found.
  • InvalidVolumeError: Raised when an invalid volume value is provided.
  • InvalidMixVolumeError: Raised when an invalid mix volume value is provided.
  • SliderNotFoundError: Raised when an unknown slider name is provided as streamerSlider value.

Example

Here is a complete example demonstrating the usage of the API:

import { Sonar } from 'steelseries-sonar-js';
import { EnginePathNotFoundError } from 'steelseries-sonar-js/dist/exceptions.js';

async function example() {
    try {
        // Initialize Sonar object
        const sonar = await Sonar.init();

        // Retrieve volume data
        const volumeData = await sonar.getVolumeData();
        console.log("Volume Data:", volumeData);

        // Set volume for the 'master' channel
        const resultVolume = await sonar.setVolume("master", 0.8, "streaming");
        console.log("Set volume for master:", resultVolume);

        // Mute the 'game' channel
        const resultMute = await sonar.muteChannel("game", true, "monitoring");
        console.log("Mute game:", resultMute);

        // Retrieve chat-mix data
        const chatmixData = await sonar.getChatMixData();
        console.log("Chatmix Data:", chatmixData);

        // Set chat-mix value
        const resultChatmix = await sonar.setChatMix(0.5);
        console.log("Set Chatmix:", resultChatmix);

    } catch (error) {
        if (error instanceof EnginePathNotFoundError) {
            console.error("Engine not found!", error.message);
        } else {
            console.error("An error occurred:", error);
        }
    }
}

example();

Special Thanks

Thanks to all contributors who made the original Python package possible - wex for figuring out the API, TotalPanther317 for understanding streamer mode and cookie for features like chat mix and streamer mode detection. Grateful for their efforts!