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 🙏

© 2024 – Pkg Stats / Ryan Hefner

chorus

v0.6.4

Published

A harmony-based music composition toolkit with MIDI I/O

Downloads

76

Readme

Chorus.js: Music Composition in JavaScript

npm version    build status    test coverage

Features

  • Compose music with code via multi-track MIDI
    • output real-time MIDI to control synthesizers, samplers, and other MIDI instruments
    • output MIDI files to save your musical ideas with perfect timing
  • Explore harmony using scales and chord progressions
  • Explore microtonal tunings

Requirements

  • Node.js v6+ (browser support is planned)
  • Optional: compilation tools for native dependencies
    • If you want real-time MIDI output, follow node-gyp's installation instructions to setup compilation tools
    • Otherwise, ignore non-fatal errors during install. You can still use MIDI file output

Quick Start Guide

  1. Install

     npm install chorus
  2. Create the file quick-start.js

// quick-start.js 
const { Song, Output } = require('chorus');
require('chorus/names').into(global);

const song = new Song({
  sections: [{
    parts: [{
      pitches: [C4, D4, E4, F4, G4, F4, E4, D4, C4],
    }]
  }]
});

Output.select().then(output => output.play(song));
  1. Output a MIDI file
  • Run:

      node quick-start.js -f quick-start.mid
            
  • Open quick-start.mid in any app that supports MIDI files

  1. Output real-time MIDI (requires native dependencies)
  • On macOS

    • Download SimpleSynth and launch it

    • Select MIDI Source: SimpleSynth virtual input in SimpleSynth

    • Run:

        node quick-start.js -p simplesynth
  • On Windows

    Use the built-in wavetable synth:

     node quick-start.js -p wavetable  

Tutorials

Work in progress!

  1. Intro / Setup - The basics of chorus.js and how to setup with a DAW
  2. Pitch - how to organize pitch
  3. Rhythm - how to organize time
  4. Pitch & Harmony - chords
  5. Song Structure - how to organize song structure
  6. Advanced Features - how to avoid repetition and create variety
  7. Microtonality - how to use more than 12 pitches per octave

Project Info