= Midi under Debian Lenny =
written 05.03.2009
changed 24.08.2011 (thanks to Åke Forslund)

Some games under dosbox need Midi to play sound, so I describe
here how to configure it.

First make sure you installed timidity.

It is not activated, by default so do:
 sudoedit /etc/default/timidity 

and comment in:

And then (re)start timidity:
  /etc/init.d/timidity restart

Now you should have midi ports, lets see:
 aplaymidi -l
  Port    Client name                      Port name
  14:0    Midi Through                     Midi Through Port-0
 128:0    TiMidity                         TiMidity port 0
 128:1    TiMidity                         TiMidity port 1
 128:2    TiMidity                         TiMidity port 2
 128:3    TiMidity                         TiMidity port 3

Voilla, we now have some 128:* ports we need, lets test it with
some midi files (locate them, some games might have one):
 aplaymidi --port 128:0 /home/apps/Spiele/Unix/liquidwar-5.5.9/custom/music/colossus.mid

You should hear a nice sound. Now we need to configure dosbox to use it:
In the section [midi] change the values to:

This tutorial needs you to install libsdl1.2debian-alsa rather than -oss
or something (Dosbox uses libsdl)

Another good hint sometimes is:
 export SDL_AUDIODRIVER=alsa

== Additional alsa information ==

To get the names of alsa devices, do a:
 aplay -L

Sometimes the shorter hw:i,j notation is used
(i is the CARD, j is DEV - both numbers).

For details see [2]

== References ==

[1] http://www.gentoo.org/doc/en/alsa-guide.xml
[2] http://www.linuxjournal.com/article/6735

== End of Information ==

The initial error was (for search engines):
DOSBox version 0.72
Copyright 2002-2007 DOSBox Team, published under GNU GPL.
CONFIG:Loading primary settings from config file
ALSA:Can't subscribe to MIDI port (65:0) nor (17:0)
MIDI:Can't open device:alsa with config:.
     ALSA:Can't subscribe to MIDI port (65:0) nor (17:0)
     MIDI:Opened device:oss
Die Jän 3 15:01:52 CET 2017
anybrowser.gif elektra.jpg fsfe-logo.png patent_button.gif valid-css.png valid-html401.png vim.gif