#999710 timidity patch 0005-fix-drum-panning.patch appears to be wrong

Package:
timidity
Source:
timidity
Description:
Software sound renderer (MIDI sequencer, MOD player)
Submitter:
Hans de Goede
Date:
2021-11-15 13:09:04 UTC
Severity:
normal
#999710#5
Date:
2021-11-15 12:44:45 UTC
From:
To:
I have been working on updating Fedora's timidity
packages to the 2.15.0 release (which is actually
quite old) and checking Debian's patches as part
of this.

Patch 0005-fix-drum-panning.patch, which fixes:
https://bugs.debian.org/536252

Stood out to me.

I've been looking at: 0005-fix-drum-panning.patch
and I believe that this patch is wrong.

In most cases bank->tone[prog].pan is set to -1
(which gets checked in the if above the modified
line). Unfortunately I don't have a test .mid file
where this is differently. I'm using
/usr/share/soundfonts/fluid3gm.cfg as timidity cfg,
like in the bug report, so I assume this being set
comes from the .mid file.

What is actually happening here is that 2 pans in
the range of 0-127 get added together to form a new
(clamped) pan so first substracting 64 to move
one of them to a -64 - + 63 range is correct.

Maybe the drums being panned to one side was an
on purpose effect in the .mid file ?

I'm not 100% sure, but to me the original code
seems correct here.

Regards,

Hans

#999710#10
Date:
2021-11-15 12:58:38 UTC
From:
To:
A quick follow-up I just noticed this bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987052

Which is complaining about wrong pan with Debian's
timidity and with Fedora's timidty (without the patch)
this problem does not happen.