0.0.4 • Published 10 years ago

synthesisjs v0.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

synthesis.js

MIDI / MML synthesizer for Chrome, Edge and iOS Safari

This library is in a very early stage. Currently it has square wave only.
Working demo is available here. You can play it with MIDI keyboard or mml2smf MMLs.

Usage

<script src="synthesis.min.js"></script>

Process MIDI Message

var synthesizer = new synthesisjs.Synthesizer();

setTimeout(function() {
	// Note On
	synthesizer.processMIDIMessage([0x90, 60, 100]);
}, 1000);

setTimeout(function() {
	// Note off
	synthesizer.processMIDIMessage([0x80, 60, 100]);
}, 2000);

Play MML

var smf = synthesisjs.mml2smf("t150l8 g4gagrfrerfrg2");

var synthesizer = new synthesisjs.Synthesizer();
var smfPlayer = new synthesisjs.SMFPlayer(synthesizer);
smfPlayer.play(smf);

Build

$ npm install
$ npm run watch

MIDI Implementation Chart

MIDI Input (Ch. 1-16)

  • Note On/Off
  • Pitch Bend
  • CC 1 (Modulation Wheel)
  • CC 7 (Channel Volume)
  • CC 10 (Pan)
  • CC 11 (Expression Controller)
  • CC 64 (Damper Pedal On/Off)
  • CC 123 (All Notes Off)

License

MIT

Author

Katsuomi Kobayashi (@KatsuomiK / @k0rin)

http://framesynthesis.com/

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago