chorus
v0.6.4
Published
A harmony-based music composition toolkit with MIDI I/O
Downloads
76
Maintainers
Readme
Chorus.js: Music Composition in JavaScript
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
Install
npm install chorus
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));
- Output a MIDI file
Run:
node quick-start.js -f quick-start.mid
Open
quick-start.mid
in any app that supports MIDI files
- Output real-time MIDI (requires native dependencies)
On macOS
Download SimpleSynth and launch it
Select
MIDI Source: SimpleSynth virtual input
in SimpleSynthRun:
node quick-start.js -p simplesynth
On Windows
Use the built-in wavetable synth:
node quick-start.js -p wavetable
Tutorials
Work in progress!
- Intro / Setup - The basics of chorus.js and how to setup with a DAW
- Pitch - how to organize pitch
- Rhythm - how to organize time
- Pitch & Harmony - chords
- Song Structure - how to organize song structure
- Advanced Features - how to avoid repetition and create variety
- Microtonality - how to use more than 12 pitches per octave