cifkao / html-midi-player

🎹 Play and display MIDI files on the web
https://cifkao.github.io/html-midi-player/
BSD 2-Clause "Simplified" License
630 stars 56 forks source link

Midi player not working #5

Closed juancopi81 closed 3 years ago

juancopi81 commented 3 years ago

I am using the midi player in a personal project, it was working fine until yesterday, but today the play button is disabled:

image

When I see the console it shows me the following error: Uncaught (in promise) TypeError: h.ToneAudioBuffers is not a constructor:

image

My project is at https://www.komposair.com/ I am not sure if it is an error on my end or if this is the place to report it... but since it was working fine I thought it is something else. Any help would be appreciated...

cifkao commented 3 years ago

Thanks for reporting this! It turns out @magenta/music got upgraded today to version 1.21.0 and now depends on a more recent major version of tone (14.7.58). Upgrading tone to this version seems to fix the problem. It may be a good idea to pin exact versions of the libraries to ensure that upgrades like this don't break your project. I think I will do the same in my examples. E.g.:

<script src="https://cdn.jsdelivr.net/combine/npm/tone@14.7.58,npm/@magenta/music@1.21.0/es6/core.js,npm/focus-visible@5,npm/html-midi-player@1.1.0"></script>
juancopi81 commented 3 years ago

Great! Thank you very much