LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.04k stars 1k forks source link

Soundfont player: Some soundfonts pitch is incorrect #6915

Closed syusui-s closed 11 months ago

syusui-s commented 1 year ago

Bug Summary

Some soundfont patches do not sound correctly in version 1.3.0-alpha. The pitch of some patches is different from the correct pitch.

I checked these soundfonts sound correctly in the stable version 1.2.2 (Arch Linux package). And, it worked correctly in the old versions of 1.3.0-alpha (e.g. 1.3.0.alpha.1.r283.gf13e95932-1 f13e95932).

Here is a zip file which includes an project file mmpz and exported tracks (ogg): lmms_bug.zip

Steps to reproduce

  1. Add a new track of Soundfont Player.
  2. Select a file of soundfont described above.
  3. Select bank/patch described above.
  4. Play virtual keyboard with mouse

You can also use the example project attached.

Expected behavior

Soundfount sounds correctly.

Actual behavior

Soundfont sounds incorrectly.

Screenshot

N/A

Affected LMMS versions

LMMS 1.3.0-alpha.1.354+ge1d3ecb18 @ master branch

System info

Arch Linux (Linux 6.5.2-arch1-1 x86_64) I installed these versions of LMMS via AUR.

yohannd1 commented 1 year ago

Glad it wasn't a problem only here. It also happens with some patches on the GeneralUser_GS soundfont (very noticeable on the "Honky-Tonk" patch).

DomClark commented 12 months ago

@syusui-s and @YohananDiamond - Could you test #6924 (downloadable at https://lmms.io/download/pull-request/6924) and see if that fixes this issue?

syusui-s commented 12 months ago

@DomClark

I tested it and I think it worked correctly.

I exported tracks made with #6924, and compared them to ones made with e1d3ecb1 by using Audacity. If I play the original track and the same track which phase is inverted at the same time, there should be no sound in theory. And, there are mostly no difference. There were just a little bit volume difference, so I could hear the tiny sounds but this difference was caused even if I export tracks with the same version twice.

Thank you for fixing the issue.

DomClark commented 12 months ago

Thanks for testing! I'll mark that PR as fixing this issue.

yohannd1 commented 12 months ago

Also tested it - working fine now as well!

musikBear commented 10 months ago

Follow up question Do we know how many semitones this is 'off', and do we know if this number of semitones are constant? I an thinking on older projects and a generalized method for re-tuning soundfonts in old projects so they will sound as intended also in 1.3, where this fix will now alter the soundfont output @DomClark

DomClark commented 10 months ago

Do we know how many semitones this is 'off', and do we know if this number of semitones are constant?

The number of semitones this is off by depends on the SoundFont, patch, and note, but will be constant for each (i.e. it won't change over time).

I an thinking on older projects and a generalized method for re-tuning soundfonts in old projects so they will sound as intended also in 1.3, where this fix will now alter the soundfont output

This bug wasn't present in older versions of LMMS. I introduced it in #6602, and fixed it shortly afterwards, so we don't need to worry about backwards compatibility.

musikBear commented 10 months ago

This bug wasn't present in older versions of LMMS

Good! That is important -No issues then. Thanks!