Sound advice sought
Hello.
Quoted 2 lines · Jan Willem Stumpel
By trial & error -- because I know practically nothing about midi.
But there is a sound-usage.txt that describes the ways of getting midi to work, among other things.
The midid program is not properly documented there, but "midid --help" can fill the gap sometimes.
Quoted 2 lines
I have not yet found a
*game* that can make midi music in this way.
They all can (almost). Just set them to General Midi or MPU-401. Or to MT-32 and use the -m option for midid. Or "Sound Canvas" with the same option to midid, etc.
Quoted 2 lines
In the above commands, '3' can be any number it seems; but it must be the same in both commands.
True. This is a TCP port number which is used for communication between midid and timidity.
Quoted 1 line
-- is this the 'right' way? Or is there a simpler way?
There are other ways, see sound-usage.txt. They may (and usually do) work better. However in case you stuck with OSS and without the HW synth, this might be the only way for you to get midi. Also midid allows you to record the music to a .mid files.
Quoted 2 lines
-- is there a correct value for the 'magic number' (3 in the example above)?
7777 is a default for midid, but basically any number above 1024 is OK. Using ports below 1024 requires root and is not recommended.
Quoted 3 lines
-- the sound is a bit weird: a bit too slow, and the tempo is somehow "wobbly" (the notes don?t seem to arrive always exactly at the correct time).
Try renicing timidity for a higher priority. Sometimes that helps.
Quoted 2 lines
Also, if I stop gsplay, there is some 'afterburst' of music (a few notes). Is this normal?
You have to upgrade to the daily snapshot of TiMidity++, or from CVS to avoid some of the weirdness, although some problems are still there. Also try playing around with the -o option of midid.
Quoted 5 lines · Stas Sergeev
Quoted 2 lines
I have not yet found a *game* that can make midi music in this way.
They all can (almost). Just set them to General Midi or MPU-401.
Right ... in the Duke3D setup program I selected 'music via General Midi' and I could hear the 'Duke Theme Music'! But the game itself would not start (not until I selected 'no music card' again). I suppose you cannot play 2 sounds (effects + music) at the same time. Is there a fix? Do I have to study esd, artsd?
Thanks very much for your explanation on the 'magic', i.e. port, number. After starting timidity with -ir 7777 the midid no longer needs a -p parameter. This information should go into the doc's (or on my Dosemu for Dummies page when I get around to updating it..)
I'll experiment with the latest version of timidity.
Regards, Jan
Quoted 5 lines · Jan Willem Stumpel
Right ... in the Duke3D setup program I selected 'music via General Midi' and I could hear the 'Duke Theme Music'! But the game itself would not start (not until I selected 'no music card' again). I suppose you cannot play 2 sounds (effects + music) at the same time. Is there a fix? Do I have to study esd, artsd?
Hi,
apparently the es1371 has two PCM interfaces. If they are both supported by the driver, maybe you can point either dosemu or timidity to /dev/dsp1 and thus get both sound effects and music. I don't have such a card, so I don't know if this works, but the Documentation/sound/es1371 file in the kernel sources suggests that it may work.
Cheers,
Rob Komar
P.S. The sources to Duke3D have been released and you can build a version that runs natively on Linux that performs better than running it in dosemu (see www.icculus.org), and doesn't need separate sound and music channels. However, you will need dosemu to play the other great BUILD-based games (Redneck Rampage, Shadow Warrior, Blood,...). Thank goodness dosemu works so well.
Quoted 3 lines · Robert Komar
apparently the es1371 has two PCM interfaces. If they are both supported by the driver, maybe you can point either dosemu or timidity to
/dev/dsp1and thus get both sound effects and music.
This is true. Thanks very much! The two commands which I execute before starting xdosemu are now:
timidity -o /dev/dsp1 -ir 7777 &
and
midid ~/.dosemu/run/dosemu-midi &
Now I can get both music and sounds in Duke3D. Well, in the intro sequence. When the actual game begins, Duke freezes and, after a mouse movement, crashes with a lot of messages beginning with
DOS/4GW Professional error (2002): transfer stack overflow on interrupt 0Dh at A7:000074C8
So not everything is all right, but this is huge progress anyway. I also could get music out of "Jones in the fast lane" for the first time.
Regards, Jan