Feature Request: Custom midi files

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
MikeG
Engineer
Engineer
Posts: 8
Joined: 26 Jan 2005 12:49

Feature Request: Custom midi files

Post by MikeG »

Hello,

while coding on my own driver I had another idea. What about custom files in _path.gm_dir?

There's a fine site I found which has free midi files http://www.midifilearchive.com/midifilesmain.html

So I wrote a small function to read in all another files existing in gm. It should be much better, but for the moment it adds all files (default + custom) t
o a global list.

Now I have a problem, that I don't understand some code in music_gui.c, which should be changed to play midis from the new list not from old.

Maybe another coder will take this advantage to its end. It would be a nice feature, because 22 songs in 3 to 4 hours are repeated about 3 times.

Mike

See attached patch.
Attachments
custom-midifiles.patch
Please cast the function AddCustomMidiFiles() somewhere in ttd_main() after LoadFromConfig();
(1.84 KiB) Downloaded 224 times
User avatar
orudge
Administrator
Administrator
Posts: 25218
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

My new music patch already allows custom MP3, MIDI, Ogg Vorbis and WAV files from an M3U playlist file... it's not released yet as the MP3 support is slightly lacking, but I might get it finished up a bit more this weekend.
MikeG
Engineer
Engineer
Posts: 8
Joined: 26 Jan 2005 12:49

Post by MikeG »

Oh, I won't mess with you ;)

Did post a patch? May I can help... I love to read the code in this application. Because its a very nice game, I really want to improve it. :D

Mike
User avatar
orudge
Administrator
Administrator
Posts: 25218
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

I haven't posted a patch yet, I will sometime soon though.
User avatar
Dextro
Chief Executive
Chief Executive
Posts: 701
Joined: 12 Jan 2005 21:56
Location: Lisboa, Portugal
Contact:

Post by Dextro »

orudge wrote:My new music patch already allows custom MP3, MIDI, Ogg Vorbis and WAV files from an M3U playlist file... it's not released yet as the MP3 support is slightly lacking, but I might get it finished up a bit more this weekend.
HOLY COW NOW THERE'S SOMETHING GOOD!!! :shock:

Can't wait for that patch, I use my winamp running in the background ad the midi files turned off but for newbies that would be great :)
Uncle Dex Says: Follow the KISS Principle!
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 15 guests