Package: timidity
Version: 2.13.2-25
Severity: normal
Tags: patch

When Fluid soundfonts are installed, configuration files are installed to the 
Timidity directory. These have correct 
(for Timidity) values on all the "pan=" statements, with 0 signifying "centre". 
For the drum kits, each "note" usually has a pan
value to place the drum in the correct stereo location. (Other instruments are 
usually centred.) 

However, timidity plays the drums panned about 80% to one side, even if they 
are set to 0, or the keyword "center".

I THINK this is a bug in the internals of Timidity.  Internally, panning values 
are coded 0 (left) - 64 (centre) - 127 (right).
In file instrum.c the expression "pan = ((int) bank->tone[prog].pan & 0x7f) - 
64 ;"  appears, which is converting a 0..127 value
to +/-64, which seems wrong.

When I remove the minus 64 and recompile, drums appear in the correct stereo 
positions.


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-thinkpad (PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages timidity depends on:
ii  freepats               20060219-1        Free patch set for MIDI audio synt
ii  libasound2             1.0.19-1          shared library for ALSA applicatio
ii  libaudio2              1.9.1-2           Network Audio System - shared libr
ii  libc6                  2.9-18            GNU C Library: Shared libraries
ii  libesd0                0.2.36-3          Enlightened Sound Daemon - Shared 
ii  libflac8               1.2.1-1.2         Free Lossless Audio Codec - runtim
ii  libice6                2:1.0.4-1         X11 Inter-Client Exchange library
ii  libjack0               0.116.1-4         JACK Audio Connection Kit (librari
ii  libncurses5            5.6+20080308-1    Shared libraries for terminal hand
ii  libogg0                1.1.3-4           Ogg Bitstream Library
ii  libpng12-0             1.2.15~beta5-3    PNG library - runtime
ii  libsm6                 2:1.0.3-1+b1      X11 Session Management library
ii  libvorbis0a            1.2.0.dfsg-5      The Vorbis General Audio Compressi
ii  libvorbisenc2          1.2.0.dfsg-5      The Vorbis General Audio Compressi
ii  libx11-6               2:1.2.1-1         X11 client-side library
ii  libxaw7                2:1.0.4-1         X11 Athena Widget library
ii  libxext6               2:1.0.4-1         X11 miscellaneous extension librar
ii  libxmu6                2:1.0.4-1         X11 miscellaneous utility library
ii  libxt6                 1:1.0.5-3         X11 toolkit intrinsics library
ii  lsb-base               3.2-20            Linux Standard Base 3.2 init scrip
ii  zlib1g                 1:1.2.3.3.dfsg-11 compression library - runtime

timidity recommends no packages.

Versions of packages timidity suggests:
ii  fluid-soundfont-gm            3.1-2      Fluid (R3) General MIDI SoundFont 
ii  fluid-soundfont-gs            3.1-1      Fluid (R3) General MIDI SoundFont 
ii  pmidi                         1.6.0-4    A command line midi player for ALS

-- no debconf information
--- instrum.c	2009-07-08 16:32:06.000000000 +0100
+++ instrum.c.old	2004-05-30 22:48:11.000000000 +0100
@@ -1070,7 +1070,7 @@
 		}
 		/* panning */
 		if (ip != NULL && bank->tone[prog].pan != -1) {
-			pan = ((int) bank->tone[prog].pan & 0x7f) ; /* sg - 64; */
+			pan = ((int) bank->tone[prog].pan & 0x7f) - 64;
 			for (i = 0; i < ip->samples; i++) {
 				panning = (int) ip->sample[i].panning + pan;
 				panning = (panning < 0) ? 0

Reply via email to