davy7125 / polyphone

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

[BUG] Polyphone determines sf3 soundfonts via the filename, not the soundfont version #200

Closed spessasus closed 3 months ago

spessasus commented 3 months ago

The issue

Polyphone decompresses the soundfont only if the filename extension is sf3. It doesn't check ifil like it should. (Or check sample type). This causes soundfont3 soundfonts saved with a .sf2 extension to be broken.

SoundFont3 Format

How to reproduce

  1. Grab this sf2 file and open it
  2. Navigate to samples
  3. Audio is completely broken
  4. Rename extension to "sf3"
  5. Reopen and navigate to samples
  6. Audio is fixed

Expected behavior

Polyphone should check if ifil is 3 instead of filename extension. That or check if (sampleType & 0x10) > 1

Version tested

2.3.1 (Flatpak)

davy7125 commented 3 months ago

I close this ticket since it be part of the job done in #204