MIDI music through ALSA / Linux

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
melrose
Engineer
Engineer
Posts: 13
Joined: 15 Mar 2013 15:29

MIDI music through ALSA / Linux

Post by melrose »

is there any chance to use openttd MIDi music through ALSA / Linux?
if so how to do this with command line parameter (openttd -m ??)
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1791
Joined: 30 Mar 2005 09:43

Re: MIDI music through ALSA / Linux

Post by peter1138 »

Only indirectly via the extmidi "driver" which can call a midi player with the file to play as an argument. pmidi or aplaymidi sort of work for that.
He's like, some kind of OpenTTD developer.
melrose
Engineer
Engineer
Posts: 13
Joined: 15 Mar 2013 15:29

Re: MIDI music through ALSA / Linux

Post by melrose »

any documentation how to use the extmidi driver?
melrose
Engineer
Engineer
Posts: 13
Joined: 15 Mar 2013 15:29

Re: MIDI music through ALSA / Linux

Post by melrose »

i started fluidsynth and tried:

openttd -r 1915x1175 -m extmidi:aplaymidi -p 128:0 tttheme2.mid

but failed.
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1791
Joined: 30 Mar 2005 09:43

Re: MIDI music through ALSA / Linux

Post by peter1138 »

You need to quote the parameters, and add `cmd=`: `openttd -r 1915x1175 -m "extmidi:cmd=aplaymidi -p 128:0 tttheme2.mid"`

This can also be set in openttd.cfg as well.
He's like, some kind of OpenTTD developer.
melrose
Engineer
Engineer
Posts: 13
Joined: 15 Mar 2013 15:29

Re: MIDI music through ALSA / Linux

Post by melrose »

peter1138 wrote: 13 Jan 2025 16:30 You need to quote the parameters, and add `cmd=`: `openttd -r 1915x1175 -m "extmidi:cmd=aplaymidi -p 128:0 tttheme2.mid"`

This can also be set in openttd.cfg as well.
that's it! I did
openttd -r 1915x1175 -m "extmidi:cmd=aplaymidi -p 20:0 content_download/baseset/openmsx-0.4.0/*.mid"
and now I can enjoy openttd MIDI music with my oldschool Roland Sound Canvas.
Thanks a lot!
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 5 guests