davy7125 / polyphone

A soundfont editor for quickly designing musical instruments.
https://www.polyphone.io
GNU General Public License v3.0
344 stars 45 forks source link

unexpected NULL character during export #193

Closed ckrisz closed 1 month ago

ckrisz commented 3 months ago

I converted MuseScore_General.sf3 to .sfz with polyphone. This is the default sound bank of MuseScore3.

I want to open it with sforzando but it cannot parse the sf2 file. The reason: end of comment section is followed by a NULL byte, comment00 0A 0A<group So I have to remove NULL to solve this issue. In other words, comment0A 0A<group works well.

If I delete the last character from the comment in polyphone editor, it exports the content well.

davy7125 commented 1 month ago

(I guess you converted sf3 to sf2 (not sfz) with Polyphone?)

You should address the sf2 parse error to sforzando. Here a an extract of sf2 format specification:

5.10 The ICMT Sub-chunk The ICMT sub-chunk is an optional sub-chunk containing any comments associated with the SoundFont compatible bank. It contains an ASCII string of 65,536 or fewer bytes including one or two terminators of value zero, so as to make the total byte count even.