cifkao / html-midi-player

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

Can't do custom soundfont #50

Closed Mitchykins closed 2 years ago

Mitchykins commented 2 years ago

I tried the directions on the readme for the custom sound font, but it just gives me a syntax error <midi-player src="insert_midi_here.mid" sound-font="insert_soundfont_hosted_on_the_same_site_here.sf2"></midi-player> even this doesn't work <midi-player src="insert_midi_here.mid" sound-font="https://sitegoeshere.domain/insert_soundfont_hosted_on_the_site_here.sf2"></midi-player> Am I doing something wrong, or am I limited to the ones the script comes with?

This works fine at least <midi-player src="insert_midi_here.mid" sound-font></midi-player>

cifkao commented 2 years ago

From the readme:

See the Magenta.js docs for a list of available SoundFonts.

These are not *.sf2 SoundFonts, they are in a format specific to Magenta.

Custom ones can be created, but there is no automated way to convert from a *.sf2 file (see #43).