midi.js

How to implement MIDI player of MIDI.js for notes sequence

橙三吉。 提交于 2019-12-12 00:53:16
问题 I am using MIDI.js in my project, here is my code for playing sequence of MIDI notes for (var repeat = 0; repeat < melodyrepititions; repeat++) { for (var i = 0; i < composition.length; i++) { for (var j = 0; j < composition[i].length; j++) { if (composition[i][j] != 0) { MIDI.noteOn(0, composition[i][j] + scale, velocity,delay ); MIDI.noteOff(0, composition[i][j] + scale, delay+onlynotationsofeachbeatbracketdelay[i][j]); } else if (composition[i][j] == 0) { MIDI.noteOff(0, composition[i][j]