-
Notifications
You must be signed in to change notification settings - Fork 119
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
Importing midi file broken #70
Comments
I'm actually super confused now — what is the difference between this package and the EDIT: looks like |
This package used to be called It sounds like your bundler is behaving differently than what one of your dependencies was tested against. |
Closing, since i don't this is still relevant in the latest version. please reopen if there are still import issues |
This is connected to an issue filed with tensorflow/magenta-js.
Issue
Importing a midi file (via magenta-js, which is using Tonejs Midi) 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: