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.
<script src="synthesis.js"></script>
let synthesizer = new synthesisjs.Synthesizer();
setTimeout(function() {
// Note On
synthesizer.processMIDIMessage([0x90, 60, 100]);
}, 1000);
setTimeout(function() {
// Note off
synthesizer.processMIDIMessage([0x80, 60, 100]);
}, 2000);
let smf = synthesisjs.mml2smf("t150l8 g4gagrfrerfrg2");
let synthesizer = new synthesisjs.Synthesizer();
let smfPlayer = new synthesisjs.SMFPlayer(synthesizer);
smfPlayer.play(smf);
$ npm install
$ npm run watch
- 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)
MIT
Katsuomi Kobayashi (@korinVR / @korinVR_en)