Page 1 of 1
Got sound but no music under linux, ubuntu
Posted: 18 Feb 2007 15:03
by Tuffy
I can only hear the sounds while in game, not the music. Ive copied all the .gm files from the original game to the necessary folders, and while in game, when I press the jukebox button, it speeds through all the songs. Like when you have the song files, but they are empty. However, I already checked this and the files have (I think) the correct sizes.
Im running Ubuntu Edgy Eft, with a USB headset.
thanks for any help,
Posted: 18 Feb 2007 21:29
by brazso
Hi Tuffy,
I have experienced the same problem, but I know that my sound card does not play midi files in linux/alsa. At least so far I could not set it up with my SB Audigy LS. Can you play other midi files?
brazso
Posted: 18 Feb 2007 21:55
by Darkvater
Do you have timidity or some other midi player on your system? You either need to specify it yourself, or compile it into openttd.
Posted: 18 Feb 2007 22:24
by phil88
You might find
this useful. You need to set ubuntu up to be able to play midi.
Posted: 20 Feb 2007 10:35
by brazso
Thanks Darkvater and phil88. Based on your instructions, I have installed timidity and the midi files are being played well in the game.
Posted: 06 May 2007 18:00
by apdt
brazso wrote:Hi Tuffy,
I have experienced the same problem, but I know that my sound card does not play midi files in linux/alsa. At least so far I could not set it up with my SB Audigy LS. Can you play other midi files?
brazso
I have managed to get openTTD to play music using my SB Live's wavetable. This way it's not using timidity and caning my CPU.
I'm running Ubuntu Feisty (7.04), so adjust as necessary for your distro.
First install the awesfx package.
Then find the files 8mbgmsfx.sf2 4gmgsmt.sf2 and 2gmgsmt.sf2 from the SB Live installation CD (or somewhere on your windows partition) and put them into /usr/share/sounds/sf2
Run
to load the soundfont into the sound card.
Next run
You should see output something like this:
Code: Select all
Port Client name Port name
14:0 Midi Through Midi Through Port-0
16:0 SBLive 5.1 [SB0060] EMU10K1 MPU-401 (UART)
17:0 Emu10k1 WaveTable Emu10k1 Port 0
17:1 Emu10k1 WaveTable Emu10k1 Port 1
17:2 Emu10k1 WaveTable Emu10k1 Port 2
17:3 Emu10k1 WaveTable Emu10k1 Port 3
Note the port for Emu10k1 Port 0 (17:0 in this case)
run the following substituting for the port above.
you should now be able to use aplaymidi to play one of the gm files from the gm directory.
Assuming That worked correctly, the last step is to edit ~/.openttd/openttd.cfg
In the [music] section set the extmidi line to:
You should now have midi sound woring in openttd without it eating up all your CPU time.
good luck,
Alex
Posted: 06 May 2007 19:29
by TrueBrain
Would you mind adding this in the wiki? (at the right place of course). Would be very useful! Tnx

Posted: 06 May 2007 20:59
by Sacro
Indeed, I shall be trying it later (I only just realised my soundcard supports it!)
Posted: 06 May 2007 21:37
by apdt
TrueLight wrote:Would you mind adding this in the wiki? (at the right place of course). Would be very useful! Tnx

No problem. See
here.
I've put it in the Installation Category, but I haven't linked to it from anywhere yet. I'm still finding my way round the wiki. Suggestions/improvements welcome.
thanks,
Alex