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: 315
Joined: March 30th, 2019, 10:38 pm
Location: The North Pole

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.
--
Any typos are the fault of my laptop keyboard!
Lonely Era Merry Christmas Campaign Red MP Maps
User avatar
Iris
Site Administrator
Posts: 6779
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.
Add-ons server (campaignd) admin and maintainer
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm (now available for Wesnoth 1.14.x and 1.15.12+).
User avatar
Atreides
Posts: 315
Joined: March 30th, 2019, 10:38 pm
Location: The North Pole

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.
--
Any typos are the fault of my laptop keyboard!
Lonely Era Merry Christmas Campaign Red MP Maps
gnombat
Posts: 359
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: 315
Joined: March 30th, 2019, 10:38 pm
Location: The North Pole

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!
--
Any typos are the fault of my laptop keyboard!
Lonely Era Merry Christmas Campaign Red MP Maps
Post Reply