MIDI files don't work

Create music and sound effects for mainline or user-made content.

Moderator: Forum Moderators

Post Reply
User avatar
Atreides
Posts: 1039
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

MIDI files don't work

Post by Atreides »

Hi, not sure if this is the right board but I am stumped as to why the midi files in my campaign don't play (or are audible). I know the wml works because I subbed in a mainline ogg for one midi and the ogg played fine. I also know the midi files play when I access them from my OS (Linux).

I tried to find some info on whether midi files are no longer supported but zilch so as a last resort I ask for help.
User avatar
Iris
Site Administrator
Posts: 6796
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: MIDI files don't work

Post by Iris »

Wesnoth uses SDL_mixer, which optionally supports MIDI playback using fluidsynth or timidity on Linux. This support may not always be available, compiled in, usable out of the box, or fully functional on all platforms for which Wesnoth is distributed, so we don't officially support using MIDI files in Wesnoth. Only Ogg Vorbis and pcm/wav are officially supported by the game on all platforms, so the recommendation is to convert files in any other format to Ogg Vorbis (music and sound effects) or wav (sound effects) before distribution. This has the added benefit of removing the issue of playback differences between platforms and devices for formats like MIDI.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
User avatar
Atreides
Posts: 1039
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: MIDI files don't work

Post by Atreides »

Iris wrote: February 23rd, 2021, 8:27 pm Wesnoth uses SDL_mixer, which optionally supports MIDI playback using fluidsynth or timidity on Linux. This support may not always be available, compiled in, usable out of the box, or fully functional on all platforms for which Wesnoth is distributed, so we don't officially support using MIDI files in Wesnoth. Only Ogg Vorbis and pcm/wav are officially supported by the game on all platforms, so the recommendation is to convert files in any other format to Ogg Vorbis (music and sound effects) or wav (sound effects) before distribution. This has the added benefit of removing the issue of playback differences between platforms and devices for formats like MIDI.
Thank you for the reply. I inherited them from an old campaign I updated. I'll leave them as is, as it seems some people may be able to hear them based on the info you provided. I may try and research how to convert them.
gnombat
Posts: 671
Joined: June 10th, 2010, 8:49 pm

Re: MIDI files don't work

Post by gnombat »

If you have the timidity program installed, you should be able to convert to Ogg Vorbis with this command:

Code: Select all

timidity FILE.mid -Ov -o FILE.ogg
User avatar
Atreides
Posts: 1039
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: MIDI files don't work

Post by Atreides »

gnombat wrote: February 24th, 2021, 10:23 am If you have the timidity program installed, you should be able to convert to Ogg Vorbis with this command:

Code: Select all

timidity FILE.mid -Ov -o FILE.ogg
Thank you very much, that was quite easy! It works now, woo hoo!
Post Reply