You are not logged in.

#1 2007-08-11 00:55:53

Slammer64
Member
From: Ozark Mountains of Missouri
Registered: 2007-07-28
Posts: 113

Midi Output via Games (Solved)

I have a problem that's stumping me. I am an avid fan of Duke3d and I have installed the game, but while I get sound effects playback I get no midi playback. I have my user already added to audio, I have timidity++ installed with soundfonts in the proper directories (I can play back midi using kmid/timidity++  on the command line for both root and user). Duke3d writes it's midi to a hidden directory under the user /home/.duke3d. I can even play this with kmid with no problems. I just can't get it up and running in the game. I have an Creative Sound Audigy SE PCI, cheap I know, but it's all I could afford at the moment. And I know the midi playback on an Audigy SE is disabled under Linux, that's why I was using timidity++. I would appreciated any help offered and if you need more info, simply post and I will reply ASAP.

Finally solved it, it seems that the copy of sdl_mixer Arch has is biased to the /usr/lib/timidty directory. I noticed that the sdl_mixer homepage says that timidity will look for GUS soundpatches in the /usr/local/lib/timidity directory and then I checked the sdl_mixer PKGBUILD and noticed that it's been redirected to the /usr/lib/timidity directory. After placing eawpats in this directory and altering the timidity.cfg file I was playing midi files as normal, but still no sound in games like Duke3d. After some further checking, I noticed that these older programs look for /etc/timidity.cfg not /etc/timidity++/timidity.cfg as Arch uses. I did a simple symlink of timidity.cfg to the programs directory and viola!. I have midi sound now with my programs. Just letting fellow Archers know my solution in case anyone else has a problem, Arch rocks!

Last edited by Slammer64 (2007-08-13 17:09:25)


Somewhere, just out of sight, the Penguins are gathering!

Offline

#2 2007-08-19 20:58:50

erm67
Member
From: Europe
Registered: 2007-08-01
Posts: 123

Re: Midi Output via Games (Solved)

Slammer64 wrote:

Finally solved it, it seems that the copy of sdl_mixer Arch has is biased to the /usr/lib/timidty directory. I noticed that the sdl_mixer homepage says that timidity will look for GUS soundpatches in the /usr/local/lib/timidity directory and then I checked the sdl_mixer PKGBUILD and noticed that it's been redirected to the /usr/lib/timidity directory. After placing eawpats in this directory and altering the timidity.cfg file I was playing midi files as normal, but still no sound in games like Duke3d. After some further checking, I noticed that these older programs look for /etc/timidity.cfg not /etc/timidity++/timidity.cfg as Arch uses. I did a simple symlink of timidity.cfg to the programs directory and viola!. I have midi sound now with my programs. Just letting fellow Archers know my solution in case anyone else has a problem, Arch rocks!

I had the same problem as you and after a few attempts I found that sdl_mixer embeds a old version of timidity that looks in /etc/timidity/timidity.cfg for a config file after a little search I found that only the timidity.cfg that comes with eawpatches (AUR) is compatible with sdl_mixer but the PKGBUILD does not installs it. So I modified it to istall also the timidity.cfg file required by sdl_mixer. This way everithing is installed with pacman and all games using sdl_mixer to play midi files should be happy.

EDIT How can I submit it to AUR? open a bug, write to the mantainer ....?

pkgname=timidity-eawpatches
pkgver=12
pkgrel=2
pkgdesc="Eric Welsh's GUS patches for TiMidity"
url="http://bbs.archlinux.org/viewtopic.php?t=4905"
source=(ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/eawpats12_full.tar.gz)
arch=('i686' 'x86_64')
depends=timidity++
conflicts=timidity-instruments
#install=$pkgname.install
md5sums=('8ebcf0583f3077346ebace93c8ea166f')

build() {
   mkdir -p $startdir/pkg/usr/share/timidity
   cd $startdir/src
   [ -d cfg ] && rm -r -f cfg/
   mkdir -p cfg
   mv -f eawpats/*.cfg cfg/
   mv -f eawpats/*config/ cfg/
   cp -rf eawpats/ $startdir/pkg/usr/share/timidity/
   mkdir -p $startdir/pkg/etc/timidity++/eawpats
   cp -f cfg/*.cfg $startdir/pkg/etc/timidity++/eawpats/
   sed -ie 's#/home/user/eawpats/#/usr/share/timidity/eawpats/\ndir /etc/timidity++/eawpats/#' cfg/linuxconfig/timidity.cfg
   mkdir -p $startdir/pkg/etc/timidity
   cp cfg/linuxconfig/timidity.cfg $startdir/pkg/etc/timidity/
}

Last edited by erm67 (2007-08-19 21:01:14)

Offline

#3 2007-11-22 18:11:43

SiD
Member
From: Germany
Registered: 2006-09-21
Posts: 729

Re: Midi Output via Games (Solved)

@Slammer64

Hi.
I am trying to get MIDI Music working in doomsday / jDoom, but it won't work.
In which folder you copied exactly the eawpatches in /usr/share/timidity or in /usr/share/timidity/eawpats ?
And where did you put  the *cfg files? Could you please post your /etc/timidity++/timidity.conf ?

Offline

#4 2007-11-23 14:24:23

Slammer64
Member
From: Ozark Mountains of Missouri
Registered: 2007-07-28
Posts: 113

Re: Midi Output via Games (Solved)

Sorry I didn't see your post earlier SiD, I am in the States and was away for Thanksgiving. I have my eawpatches in /usr/share/timidity/eawpats/
and my /etc/timidity.cfg which is linked to /etc/timidity++/timidity.cfg is as follows:
details on this file and other examples see here:
# http://www.onicos.com/staff/iz/timidity … ndfont.cfg
# http://www.onicos.com/staff/iz/timidity/dist/cfg/
#----------------------------------------------------------------
# SoundFont extension configuration
#
# soundfont <filename> [order={0|1}] [remove]
#    <filename> is the path of SoundFont file.
#    order: 0(preload) or 1(load after GUS).
#    remove: disable specified soundfont.
#
# font exclude <tonebank> [<preset> [<keynote>]]
# font order {0|1} <tonebank> [<preset> [<keynote>]]
#    <tonebank>: 0-127
#
# font exclude 128 [<drumset> [<key>]]
# font order {0|1} 128 [<drumset> [<key>]]
#----------------------------------------------------------------

# change the next line to point to a soundfont you have
# soundfonts can be found e.g. here: http://www.hammersound.net/
# soundfont /usr/share/soundfonts/DX7Piano.SF2

# you can do manipulations of the soundfont you load like this:
# e.g. removing drumset 99
# font exclude 128 99

# load drum samples after GUS patches
# font order 1 128
dir /usr/share/timidity/eawpats
source gravis.cfg
source gsdrums.cfg
source gssfx.cfg
source xgmap2.cfg

Hope this helps.


Somewhere, just out of sight, the Penguins are gathering!

Offline

#5 2007-11-26 17:04:51

SiD
Member
From: Germany
Registered: 2006-09-21
Posts: 729

Re: Midi Output via Games (Solved)

yes, moving

gravis.cfg
gsdrums.cfg
gssfx.cfg
xgmap2.cfg

from /etc/timidity++/eawpats to /usr/share/timidity/eawpats was the trick.

Thanks!

EDIT:

I've modified the PKGBUILD and the .install file from the current timidity-eawpatches version (12-6) in AUR.
With this modified version of the package music in doomsday-games works "out-of-the-box". Here are the diff-files:

PKGBUILD.diff

--- PKGBUILD    2007-09-21 08:50:54.000000000 +0200
+++ PKGBUILD    2007-11-26 18:31:34.000000000 +0100
@@ -18,12 +18,11 @@
    mkdir -p cfg
    mv -f eawpats/*.cfg cfg/
    mv -f eawpats/*config/ cfg/
-   install -d $startdir/pkg/usr/share/timidity
-   install -m644 eawpats/*.pat $startdir/pkg/usr/share/timidity/
+   install -d $startdir/pkg/usr/share/timidity/eawpats/
+   install -m644 eawpats/*.pat $startdir/pkg/usr/share/timidity/eawpats/
    for i in ethnic gsdrum08 gsdrum25 gsdrum40 gus mazpat/fx power sfx wime ; do
-          install -d $startdir/pkg/usr/share/timidity/$i
-          install -m644 eawpats/$i/*.pat $startdir/pkg/usr/share/timidity/$i/
+          install -d $startdir/pkg/usr/share/timidity/eawpats/$i
+          install -m644 eawpats/$i/*.pat $startdir/pkg/usr/share/timidity/eawpats/$i/
    done
-   install -d $startdir/pkg/etc/timidity++/eawpats
-   install -m644 cfg/*.cfg $startdir/pkg/etc/timidity++/eawpats/
+   install -m644 cfg/*.cfg $startdir/pkg/usr/share/timidity/eawpats/
 }

timidity-eawpatches.install.diff

--- timidity-eawpatches.install 2007-09-21 08:33:45.000000000 +0200
+++ timidity-eawpatches.install 2007-11-26 18:31:41.000000000 +0100
@@ -3,7 +3,7 @@
   configs=(gravis.cfg gsdrums.cfg gssfx.cfg xgmap2.cfg)
   for cfg in ${configs[@]}; do
 #      if ! [ `grep -c $cfg /etc/timidity++/timidity.cfg`==0 ]; then
-        echo "source eawpats/$cfg" >>/etc/timidity++/timidity.cfg
+        echo "source $cfg" >>/etc/timidity++/timidity.cfg
 #      fi
   done
   ln -s /etc/timidity++ /etc/timidity
@@ -15,6 +15,10 @@
 
 pre_remove() {
        sed -i '/eawpats/d' /etc/timidity++/timidity.cfg
+       sed -i '/gravis/d' /etc/timidity++/timidity.cfg
+       sed -i '/gsdrums/d' /etc/timidity++/timidity.cfg
+       sed -i '/gssfx/d' /etc/timidity++/timidity.cfg
+       sed -i '/xgmap2/d' /etc/timidity++/timidity.cfg
 }
 
 post_remove() {

Last edited by SiD (2007-11-26 18:08:12)

Offline

#6 2008-01-07 13:39:33

Firmicus
Forum Fellow
From: Germany
Registered: 2006-02-28
Posts: 168

Re: Midi Output via Games (Solved)

I have orphaned timidity-eawpatches in AUR. So if anyone is interested to adopt it, go on wink

Offline

Board footer

Powered by FluxBB