cho

chorus

A music composition toolkit for JavaScript

Showing:

Popularity

Downloads/wk

3

GitHub Stars

7

Maintenance

Last Commit

2yrs ago

Contributors

3

Package

Dependencies

1

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

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));
    
  3. 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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial