Skip to content

Error converting SoundFont from MuseScore

I'm encountering an error when trying to use rnsutils to convert the Fluid Soundfont included with MuseScore to xrni. The SoundFont file is here:

https://github.com/musescore/MuseScore/blob/master/share/sound/FluidR3Mono_GM.sf3

Here's the error I'm seeing:

Reading instruments from 'FluidR3Mono_GM.sf3'
Traceback (most recent call last):
  File "/usr/local/bin/sf2toxrni", line 11, in <module>
    sys.exit(main())
  File "/Library/Python/2.7/site-packages/rnsutils/sf2toxrni.py", line 295, in main
    for instrument_idx, sf2_instrument in enumerate(sf2.instruments):
  File "/Library/Python/2.7/site-packages/sf2utils/sf2parse.py", line 125, in instruments
    self._instruments = self.build_instruments()
  File "/Library/Python/2.7/site-packages/sf2utils/sf2parse.py", line 151, in build_instruments
    return [Sf2Instrument(self._raw.pdta, idx, self) for idx in range(len(self._raw.pdta['Inst']))]
  File "/Library/Python/2.7/site-packages/sf2utils/instrument.py", line 20, in __init__
    self.bag_size = hydra_header['Inst'][idx + 1].bag - self.bag_idx
IndexError: list index out of range