Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong instruments #3

Open
page200 opened this issue Oct 1, 2023 · 6 comments
Open

Wrong instruments #3

page200 opened this issue Oct 1, 2023 · 6 comments

Comments

@page200
Copy link

page200 commented Oct 1, 2023

When I tried midicube as well as https://github.com/gleitz/MIDI.js in December or earlier, they played wrong instruments for some (many?) MIDI files that have several instruments. Did recent commits fix this?

This problem isn't present in the abcjs branch of the original MIDI.js.

@page200
Copy link
Author

page200 commented Oct 1, 2023

This problem of all branches except abcjs as well as other problems of the abcjs branch are discussed here: mudcube#268

@mscuthbert
Copy link
Owner

Can you explain the problem w/ a bit more detail -- what are you doing and what instruments load instead? The branches work fine for me. Thanks!

@page200
Copy link
Author

page200 commented Aug 28, 2024

I modified MIDIPlayer.html such that it plays passport.mid (precisely the version available for example here, converted to base64 and put into the song variable) using SoundFonts from https://gleitz.github.io/midi-js-soundfonts/.

The instruments and tempo are wrong. For example, instead of Slap Bass 1, something like a vibraphone plays.

Have you tried passport.mid?

@mscuthbert
Copy link
Owner

I definitely know PASSPORT.MID (I'm old -- I remember when it was new) -- can you paste the midicube code you are using to load it and playback.

It is also possible that there is a 1-based GM instrument encoding going on and each of the instruments is off by one? This is a problem in a lot of very old MIDI files which used 1-127 instead of 0-127.

@mscuthbert
Copy link
Owner

None of the instrument numbering/playing code has changed since MIDI.js -- that was not the reason for the fork, only to maintain the system. Note that none of MIDI.js or midicube (here) were optimized for midi-file playing - so there are lots of MIDI features (modulations, sysex, etc.) that don't work on MIDI.js -- one of the key features was just receive-MIDI note -> play MIDI note.

@page200
Copy link
Author

page200 commented Sep 4, 2024

can you paste the midicube code you are using to load it and playback.

That version of MIDIPlayer.html is attached here. I modified this file in this 2019 version of midicube: a652051 (which was the latest version when I tried in 2022).

The modification is that it has passport.mid and SoundFonts from https://gleitz.github.io/midi-js-soundfonts/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants