MIDI.js icon indicating copy to clipboard operation
MIDI.js copied to clipboard

Midi files with multi channels doesn't work using MIDI.Player.Loadfile

Open KomeijiSatori opened this issue 5 years ago • 5 comments

I have a midi file with three channels(both acoustic_grand_piano), when calling MIDI.Player.Loadfile, it only plays one track. Another problem is that the player dropped the very first note of the midi file, and the note is at time 0:00. After I move the first note 2 seconds later then it sounds good. And also I checkout to a branch called "abcjs", and I change the code to the newest commit, the two problems are resolved. Since there're too many commits(29commits ahead of HEAD), so I can't figure out which important part has been changed. But that commit has a problem with pause function, which will play one or two unexpected notes after 3 or 4 seconds after resume.

What's more is another project Color Piano (https://galactic.ink/piano/), which is awesome and it doesn't have any of issues described above. But it seems not open source. So @mudcube , would you mind creating a repo of that project? Much thanks!

KomeijiSatori avatar Jun 20 '20 15:06 KomeijiSatori

yes. same problem.

MX-Qulin avatar Aug 15 '20 08:08 MX-Qulin

yes. same problem.

@MX-Qulin Hi, friend, I solved this problem by replacing the whole js/midi folder to single midi file used by https://galactic.ink/piano/ , and the problem resolved, cheers!

My github: https://github.com/KomeijiSatori/3d-piano-player

KomeijiSatori avatar Aug 15 '20 12:08 KomeijiSatori

well, as i use the brach abcjs if this repo, it can't work...

i'll try your solution. Anyway, thank you:)

MX-Qulin avatar Aug 16 '20 04:08 MX-Qulin