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

sonic-weave

v0.13.1

Published

The SonicWeave DSL for manipulating musical frequencies, ratios and equal temperaments

Downloads

1,156

Readme

sonic-weave

SonicWeave is a domain-specific language for working with musical frequencies, ratios, and equal temperaments.

It powers the Scale Workshop 3 language, ships with a command-line interface, exposes a TypeScript-friendly npm package, and includes template tags for embedding SonicWeave programs inside JavaScript and TypeScript.

Not to be confused with Sweave, the framework for mixing text and R code in literate programming workflows.

Package overview

The sonic-weave package includes:

Quick examples

Harmonic segment from the 8th harmonic to the 16th

8::16

10-tone equal temperament

tet(10)

The major scale in Pythagorean tuning

sort(3^[-1..5] rdc 2)

Scale title, colors, and labels

"Japanese pentatonic koto scale, theoretical. Helmholtz/Ellis p.519, nr.110"

9/8 white "Major 2nd"
6/5 green "Minor 3rd"
3/2 white "Perfect 5th"
8/5 green "Minor 6th"
2   gray  "Root & Octave"

Getting started

Install dependencies (requires Node.js 20.0.0 or newer):

npm install

Run the test suite:

npm test

Start the CLI REPL:

npx sonic-weave

To exit the REPL, type .exit or press Ctrl+C twice.

Additional resources

Special thanks

  • Arsenii 0.5° - Co-developer / language feedback
  • Inthar - Co-developer / language feedback
  • Akselai - Quality assurance
  • Godtone - Notation adviser / language feedback
  • Joe Hildebrand - Grammar review
  • Marc Sabat - Notation adviser

Acknowledgments and inspiration

SonicWeave looks a bit like JavaScript with Python-style semantics, borrows Haskell-like ranges, and shares some goals with xen-calc, with a little Zig sprinkled on top.

  • ECMAScript - Brendan Eich et al.
  • Python - Guido van Rossum et al.
  • Haskell - Lennart Augustsson et al.
  • Zig - Andrew Kelley et al.
  • OCaml - Xavier Leroy et al.
  • NumPy - Travis Oliphant et al.
  • Scala - Manuel Op de Coul
  • Scale Workshop 1 - Sean Archibald et al.
  • SQL - Donald D. Chamberlin et al.
  • FJS - "misotanni"
  • NFJS - Matthew Yacavone
  • xen-calc - Matthew Yacavone
  • Xenpaper - Damien Clarke
  • Ups and downs notation - Kite Giedraitis
  • S-expressions - "Godtone"
  • Peg.js - David Majda et al.
  • Peggy - Joe Hildebrand et al.
  • Xenharmonic Wiki - community project
  • Xenharmonic Alliance - community Discord / Facebook