GithubHelp home page GithubHelp logo

chorus.js's Introduction

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

chorus.js's People

Contributors

adamjmurray avatar kant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.