-
Notifications
You must be signed in to change notification settings - Fork 314
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
Midi Import via midiToSequenceProto broken #294
Comments
Can you please file a bug against midiconvert and link it to this one so we'll know when to update. FYI, @tambien |
Yep, sorry — should have done that originally. Here it is: Tonejs/Midi#70 |
This seems weird — I'm still waiting on hard confirmation from the linked issue, but I'm pretty sure |
@j0hnm4r5 yeah i did a major refactor a few months ago and released it under a new name. i changed the encoder/decoder and how it is being imported, so this issue might not be relevant any more to the latest version. |
It looks like we need a new issue to upgrade the tone.js dependency (currently set to "tone": "^0.12.80" when the latest version is 13.4.9 (the currently locked version is more than a year old) |
Unfortunately last time I tried to upgrade to tone 13.x, it broke all the Players 😭. @tambien, did you ever figure out why that was? |
The issue with the upgrade seems to be that the PolySynth sustains and glitches out for the first note when it's played. This seems to be because the synth is created directly before it's used. If you instead create it in the constructor initialization, this seems to fix the issue. i'll send a PR with some suggested changes hopefully today. |
Good news: we've updated Tone to 13.x! I'm going to optimistically close this as "fixed", but if it's still borked, please re-open it! |
This issue actually looks to be a problem with the midiconvert from Tone.js, but I ran into it here.
Issue
Importing a midi file using
mm.midiToSequenceProto(midiFile)
fails with this error:Solution
Midi.js
within the packagemidiconvert
callsDecoder(bytes)
from themidi-file-parser
package (expecting it to be a function), exceptmidi-file-parser
exports that function within an object.Changing
const midiData = Decoder(bytes)
toconst midiData = Decoder.default(bytes)
withinnode_modules/midiconvert/src/Midi.js
fixes the issue.The text was updated successfully, but these errors were encountered: