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

@jmon/algo

v1.1.1

Published

Algorithmic music composition library with generative algorithms, music theory, and format conversion

Readme

jmon/algo

jmon/algo (jam on studio - algorithms) a JavaScript music composition toolkit for the JMON (JSON Music Object Notation) format.

Quick Start:

Features

Algorithmic Composition

  • Music theory: Scales, progressions, harmony, rhythm
  • Minimalism: Process-based composition techniques
  • Generative algorithms: no deep learning, just you, your imagination and math: random walks, Fractals, cellular automata, genetic algorithms, Gaussian processes

JMON Format Conversion

  • Tone: Core format validation and Tone.js integration
  • ABC notation: Convert JMON to ABC notation
  • MIDI: MIDI file conversion utilities
  • Display: Score visualization and playback functions
  • SuperCollider: JMON format to SuperCollider code

Analysis & Utilities

  • Musical analysis tools (usefull for genetic algorithms)
  • Format conversion utilities
  • Mathematical utilities for music

Development

Building

deno task build    # Build ESM and UMD bundles

Jupyter Notebooks

  1. Install Deno: https://deno.com/manual/getting_started/installation
  2. Install JupyterLab: pipx install jupyterlab
  3. Install Deno kernel: deno jupyter --install
  4. Launch: jupyter-lab
  5. Create a notebook with the Deno kernel

API Overview

Core Functions

| Function | JSR | npm | Description | |----------|-----|-----|-------------| | jm.theory.* | ✓ | ✓ | Scales, chords, progressions, intervals | | jm.generative.* | ✓ | ✓ | Melodies, walks, fractals, cellular automata | | jm.analysis.* | ✓ | ✓ | Pitch, rhythm, harmony analysis | | jm.converters.* | ✓ | ✓ | MIDI, ToneJS, WAV, SuperCollider, VexFlow | | jm.audio.* | ✓ | ✓ | DSP, synthesis, audio processing | | jm.score(comp, VF, opts) | ✓ | ✓ | Sheet music (requires VexFlow param) | | jm.play(comp, opts) | ✗ | ✓ | Audio playback (npm only) | | jm.render(comp, opts) | ✗ | ✓ | Full UI player (npm only) |

Parameter-Based Dependencies

jmon/algo has zero dependencies in the JSR package. Libraries are passed as parameters:

// VexFlow for notation (both JSR and npm)
const notation = jm.score(composition, vexflowInstance, options);

// Tone.js for audio (npm package only)
const player = jm.play(composition, {Tone: toneInstance});

This design allows you to:

  • Use any version of VexFlow or Tone.js
  • Load libraries from CDN in browsers
  • Avoid dependency bloat in Deno/Node
  • Pass mocked libraries for testing

License

GPL-3

Links