Quick google search also reveals a few libraries [0] that should help.
[0] https://www.npmjs.com/package/midi-writer-js
Quick google search also reveals a few libraries [0] that should help.
[0] https://www.npmjs.com/package/midi-writer-js