Doomkid Posted July 6, 2020 As a follow up to this thread where I compare the sound of 40 different soundfonts, I decided to make a quick tutorial for Windows users on how to go about using soundfonts for Doom music. It really is very easy, and I was concerned some potential users were being turned away for fear of complexity. In reality, it takes just 3 minutes: Download Virtual MIDI Synth here: https://coolsoft.altervista.org/en/virtualmidisynth#download Download pack of 40 soundfonts here, 1.25 GB: http://www.mediafire.com/file/pp6ny49tte7n8b2/40soundfonts.rar/file Download pack of 20 here, 395 MB (better for slow connections): http://www.mediafire.com/file/lp4xs7qvz5n98if/20soundfonts.rar/file Download 10 drum soundfonts here, 33 MB: http://www.mediafire.com/file/gi91si9fmoxd5fa/10soundfonts_drums.rar/file PLEASE NOTE: While this hasn't happened to me, there have been reports of the included uninstaller deleting random files from the computer. This has never happened to me on my Windows computers, however, I thought it was worth mentioning [sorry, Yumheart :( ] I would recommend manually removing the files just in case! 24 Quote Share this post Link to post
auxo Posted July 6, 2020 Created an account to thank you :) I was just looking for something like this yesterday. Is there also a way to extract the MIDI signals (not sure what the correct name is) from wads so I can listen to them without launching doom? 2 Quote Share this post Link to post
Gez Posted July 6, 2020 14 minutes ago, auxo said: Is there also a way to extract the MIDI signals (not sure what the correct name is) from wads so I can listen to them without launching doom? MIDI music in Doom mods is typically either in MUS format or directly as standard MIDI files. Advanced music players can usually handle MUS files when they have their MIDI plugins, but you can also convert them to standard MIDI format with SLADE. Standard MIDI files obviously do not need conversion. In both cases, export them from the WAD with SLADE and there you go. XMPlay can actually just open WADs directly if you get its WAD plugin. So with that and the MIDI plugin you don't even need to extract anything, you can just load the wad in XMPlay and listen to its soundtrack. 2 Quote Share this post Link to post
auxo Posted July 6, 2020 8 hours ago, Gez said: MIDI music in Doom mods is typically either in MUS format or directly as standard MIDI files. Advanced music players can usually handle MUS files when they have their MIDI plugins, but you can also convert them to standard MIDI format with SLADE. Standard MIDI files obviously do not need conversion. In both cases, export them from the WAD with SLADE and there you go. XMPlay can actually just open WADs directly if you get its WAD plugin. So with that and the MIDI plugin you don't even need to extract anything, you can just load the wad in XMPlay and listen to its soundtrack. Thanks for the suggestions. I couldn't get the XMPlay WAD plugin to work, but I managed to extract the MIDI files using Slade. The MIDI plugin for XMPlay works like a charm so thanks for that. Now I can listen to the Eviternity soundtrack with some kickass drums :) 1 Quote Share this post Link to post
plums Posted July 10, 2020 (edited) USING SOUNDFONTS IN LINUX 2023 edit: This is all still relatively correct, however more source ports now enable you to use FluidSynth directly and specify a soundfont that way, including DSDA-Doom, Crispy Doom, and git versions of Chocolate Doom. These ports typically let you adjust (or at least turn off) the reverb and chorus effects, too, making it a good choice for using a variety of soundfonts. I figure here is a good place to post this. No video, sorry. (This might also work for Mac users too, but I'm not sure. Most of this can be applied to Windows as well, with some changes, but you're really better off just using Virtual MIDI Synth.) The short version Get this file, save it somewhere. Make sure you have Fluidsynth installed. The package is probably called 'fluidsynth' Edit ~/.bashrc with a text editor and add this line, then log out. export SDL_SOUNDFONTS=/full/path/to/soundfont/SC-55-fluidsynth.sf2 For Chocolate and Crispy, run the setup program, and under Sound Configuration choose Native MIDI or MIDI/MP3/OGG/FLAC, depending on your version. Leave the 'Timidity configuration file' field blank. For PrBoom+, go to Options -> General, and set Preferred MIDI file player (at the bottom of the first page) to SDL. For other ports, probably set it like in PrBoom+. For GZDoom, copy the soundfont to ~/.config/gzdoom/soundfonts/ (make this directory first if it doesn't exist). Start GZDoom, set Options -> Sound Options -> MIDI device to Fluidsynth, then go to Advanced options -> Midi player options -> Fluidsynth and pick SC-55-fluidsynth. (You can also set your MIDI device to TiMidity++ if it is available, which will generally sound better than Fluidsynth.) If you want more soundfonts, try Doomkid's mega soundfont pack, but be aware that Fluidsynth could make some sound bad. The long version: A lot of words here, but only because I'm trying to be thorough. Any port that uses SDL2 can use soundfonts via Fluidsynth. Unfortunately, Fluidsynth has some potentially major problems: The defaults for its reverb and chorus effects are very strong. Chorus in particular makes any sounds that use it extremely loud. You can't change these effects settings or even disable them unless the program calling fluidsynth (sdl2-mixer in this case) gives you an interface to do so. The strength of these effects are applied based on the defaults set in the soundfont, instead of any settings set in MIDI files. Fluidsynth is also pretty loud, which isn't a big deal but does get annoying with some loud MIDIs. Despite this, it's still your best option for ports like Chocolate and Crispy Doom. So to work around those problems, you have some options: Use a soundfont that has the effects defaults low, or off. This is the easiest option.Here is a hacked version of one of the SC-55 soundfonts (Emperor Grieferus's I think) that has low reverb and no chorus, as well as lower volumes all around. Here is that soundfont with no reverb at all, if you prefer. Doomkid's soundfont list probably has a few others that will work OK, but I haven't tested them thoroughly. Edit a soundfont yourself to lower/eliminate the effects.Polyphone is a free and open-source soundfont editor that's quite easy to use. Most distributions should have it. I'm not going to include how to do this in this tutorial (yet?), but I didn't find it too hard to figure out. How easy it is to remove all the chorus/reverb values depends on the soundfont -- there are a lot of places to specify these values, and changing some of them is easier than others. If you do this, you might want to lower the volumes (increase the attenuation) of everything as well. Patch sdl2-mixer to have better default effect values. If you're comfortable doing this, here is the patch I use: Spoiler --- SDL2_mixer-2.0.4_orig/music_fluidsynth.c 2020-03-11 22:55:20.225265298 -0400 +++ SDL2_mixer-2.0.4_hax/music_fluidsynth.c 2020-05-22 07:37:41.313632811 -0400 @@ -165,6 +165,12 @@ if ((music->buffer = SDL_malloc(music->buffer_size))) { if ((settings = fluidsynth.new_fluid_settings())) { fluidsynth.fluid_settings_setnum(settings, "synth.sample-rate", (double) music_spec.freq); + fluidsynth.fluid_settings_setnum(settings, "synth.chorus.depth", (double) 5); + fluidsynth.fluid_settings_setnum(settings, "synth.chorus.level", (double) 0.35); + fluidsynth.fluid_settings_setnum(settings, "synth.reverb.damp", (double) 0.4); + fluidsynth.fluid_settings_setnum(settings, "synth.reverb.level", (double) 0.08); + fluidsynth.fluid_settings_setnum(settings, "synth.reverb.width", (double) 5); + fluidsynth.fluid_settings_setnum(settings, "synth.reverb.room-size", (double) 0.5); if ((music->synth = fluidsynth.new_fluid_synth(settings))) { if (Mix_EachSoundFont(fluidsynth_load_soundfont, (void*) music->synth)) { @@ -223,7 +229,7 @@ { FLUIDSYNTH_Music *music = (FLUIDSYNTH_Music *)context; /* FluidSynth's default is 0.2. Make 1.2 the maximum. */ - fluidsynth.fluid_synth_set_gain(music->synth, (float) (volume * 1.2 / MIX_MAX_VOLUME)); + fluidsynth.fluid_synth_set_gain(music->synth, (float) (volume * 0.6 / MIX_MAX_VOLUME)); // new max 0.6 } static int FLUIDSYNTH_Play(void *context, int play_count) I could also upload an Arch Linux package if someone wants, but I'm not really interested in making sure it stays up to date (sorry) so you might have a problem the next time it gets updated. So, with all that out of the way, here's how you actually use a soundfont: SDL2-based ports - Chocolate, Crispy, PrBoom+, Eternity, and pretty much anything else that's not based on ZDoom. Make sure you have Fluidsynth. 'fluidsynth' is probably the package name. Download a soundfont and set the SDL_SOUNDFONTS environment variable to point to it. There are a few ways to do this: * To set it permanently, edit your ~/.bashrc (or maybe ~/.bash_profile, depending on your system) and add this line. Logout and back in for it to take effect: export SDL_SOUNDFONTS=/full/path/to/soundfont.sf2 * To set it temporarily (good for testing soundfonts), open up a console window and type the above line into a command-prompt, then run your Doom source port from the same prompt (once you've done step 3 below). Set your source port to use SDL for music playback. * For Chocolate and Crispy Doom, run the setup program, and under Sound Configuration choose Native MIDI or MIDI/MP3/OGG/FLAC, depending on your version. Leave the 'Timidity configuration file' field blank. * For PrBoom+, go to Options -> General, and set Preferred MIDI file player (at the bottom of the first page) to SDL. * For Eternity, go to Options -> Sound Options, and make sure Music Driver is SDL Mixer, and MIDI Device is default. * Other ports will probably have a similar choice of options. You might need to restart after setting the music device. If all has gone well, you'll now be using a soundfont for MIDI playback. Use Fluidsynth directly - PrBoom+ and maybe others. For PrBoom+, if you edit ~/.prboom-plus/prboom-plus.cfg, you can set the option 'snd_soundfont' to a soundfont directly and set 'snd_midiplayer' to "fluidsynth". Compared to using SDL2, this has the advantage of being able to shut off chorus and reverb with the mus_fluidsynth_chorus/mus_fluidsynth_reverb options, as well as adjusting mus_fluidsynth_gain. Recent devbuilds of PrBoom+ 2.5.1.7um will have reverb and chorus defaults that sound OK. GZDoom and other ZDoom-based ports GZDoom has a bunch of music player options that you can point directly to a soundfont. There are a lot of choices for music players and I'm honestly not sure if most users will need to do anything special to be able to use them. Here are some things that should work, though. For recent versions of GZDoom, you can place soundfonts in one of GZDoom's default soundfont search paths, or edit gzdoom.ini to add another one. Spoiler [SoundfontSearch.Directories] Path=$HOME/.config/gzdoom/soundfonts Path=$HOME/.config/gzdoom/fm_banks Path=/usr/share/gzdoom/soundfonts Path=/usr/share/gzdoom/fm_banks Path=/usr/local/share/doom/soundfonts Path=/usr/local/share/doom/fm_banks Path=/usr/local/share/games/doom/soundfonts Path=/usr/local/share/games/doom/fm_banks Path=/usr/share/doom/soundfonts Path=/usr/share/doom/fm_banks Path=/usr/share/games/doom/soundfonts Path=/usr/share/games/doom/fm_banks Path=/usr/share/soundfonts Choose a MIDI device, usually either Timidity++ or Fluidsynth, under Options -> Sound Options, then go to Advanced options -> Midi player options -> [the MIDI device you chose] and pick a soundfont. For older ports, you can get timidity++. Edit timidity's cfg file (probably either /etc/timidity++.cfg or /etc/timidity++/timidity.cfg or similar) and add this line: soundfont /full/path/to/soundfont.sf2 and then you should be able to use that soundfont if you choose Timidity++ as your MIDI playback device. Please let me know if you have any questions. MIDI playback on Linux can be fiddly and generally poorly documented; hopefully this covers everything relevant for Doom. Edited November 7, 2023 by plums 15 Quote Share this post Link to post
wallabra Posted September 3, 2021 Great stuff, plums :D What if I run FluidSynth daemonized? Is there a way to use ALSA instead, in Crispy Doom? 1 Quote Share this post Link to post
RetroAkaMe Posted September 3, 2021 (edited) Can't setup soundfonts in FL Studio. What program shall I use? Edit: wrongly understood the topic, move on. Edited September 3, 2021 by RetroAkaMe 2 Quote Share this post Link to post
wallabra Posted September 3, 2021 Heyy, it's aight pal! Don't sweat :) 0 Quote Share this post Link to post
BaileyTW Posted September 4, 2021 Thanks for this, was very helpful. I had tried a couple weeks back to do this when I was going through TNT with that midi pack that released recently. I was comparing music with the old ones, specifically Lets Kill at Will and I noticed all the videos on youtube used a different much better sounding soundfont than I used and I thought "damn I've been robbed of this". Tried to use virtualmidisynth but didn't use it correctly and it didn't quite work so I abandoned that. Even really good midis get a bit stale when I'm stuck on a map for a while, so it'll be really nice to switch those out to keep it fresh. 2 Quote Share this post Link to post
wallabra Posted September 5, 2021 (edited) Yep! Over time I've switched from Arachno to eawpats.sf2 (SHA1 18b70011ba5858764793f8d3a98307ac90341a9d) to briefly Musyng Kite and now am on SGM. It's good to be able to switch soundfonts :) Anyway, my original question still stands. Does Crispy Doom even have alsa-seq support? I know I wrote PRBoom UM-fork's :P </self-plug state="embarassment"> Edited September 5, 2021 by Gustavo6046 0 Quote Share this post Link to post
wallabra Posted September 19, 2021 Oh wait, it uses SDL_mixer. That does have Timidity playback, which is blergh, and also redundant since I have a daemonized Fluidsynth anyways. In my searches I found this brief mailing lists thread. My hopes are low for being able to use "native MIDI" – or honestly, more like just being able to plug it to another running program via ALSA, like Fluidsynth at all lol – but they're not null! Do let me know if you guys find anything of use. Crispy Doom could also implement ALSA separately, but I do wonder how much would cross the line and be considered tampering and un-Doom-like... 0 Quote Share this post Link to post
NightFright Posted January 26, 2022 Sorry for the necro'ing, but: Is there a way to use a soundfont in Eternity on a Windows system? The description above is only for Linux users. Is there no way to change MIDI synth in this port in general? 1 Quote Share this post Link to post
Lippeth Posted January 26, 2022 (edited) 22 minutes ago, NightFright said: Sorry for the necro'ing, but: Is there a way to use a soundfont in Eternity on a Windows system? The description above is only for Linux users. Is there no way to change MIDI synth in this port in general? The only way I've gotten Eternity to use soundfonts or use a different device is to use Virtual Midi Synth and have it all set up beforehand. Edited January 26, 2022 by Lippeth 2 Quote Share this post Link to post
Master O Posted January 26, 2022 For people who want to play Doom in DOS, both https://dosbox-staging.github.io/ and https://dosbox-x.com/ also support soundfonts. 1 Quote Share this post Link to post
Sirius104x Posted October 11, 2022 Question in general. Why is using SoundFonts so difficult to simply play midis? How is this done? I was trying to get Devilution's soundtrack extracted from the WAD file and played in Winamp in the same way as it plays in GZDoom. Oh heavens, this was not an easy task apparently! I was reading about all kinds of things like FluidSynth, QSynth, getting soundfonts, using alternate players, loading soundfonts. Jesus. How can someone just get the midis playing to sound the same as they do when GZDoom is playing them back (apparently it's using FluidSynth internally, and I found out as much as it uses a GZDoom.sf2 soundfont). Is there no program out there which just let's you simply load this SF2 file via a gui interface, and then load the midi and plays it? I am having great difficulty just accomplishing this. 0 Quote Share this post Link to post
dasho Posted October 11, 2022 (edited) 32 minutes ago, Sirius104x said: Question in general. Why is using SoundFonts so difficult to simply play midis? How is this done? I was trying to get Devilution's soundtrack extracted from the WAD file and played in Winamp in the same way as it plays in GZDoom. Oh heavens, this was not an easy task apparently! I was reading about all kinds of things like FluidSynth, QSynth, getting soundfonts, using alternate players, loading soundfonts. Jesus. How can someone just get the midis playing to sound the same as they do when GZDoom is playing them back (apparently it's using FluidSynth internally, and I found out as much as it uses a GZDoom.sf2 soundfont). Is there no program out there which just let's you simply load this SF2 file via a gui interface, and then load the midi and plays it? I am having great difficulty just accomplishing this. VLC lets you do this. Also, pretty sure Windows Media Player can still play them out of the box. Edited October 11, 2022 by dasho 1 Quote Share this post Link to post
Doomkid Posted October 11, 2022 8 hours ago, Sirius104x said: Question in general. Why is using SoundFonts so difficult to simply play midis? How is this done? I usually just start VMS (Virtual MIDI Synth), make sure the correct soundfont is loaded, then double-click the MIDI and it plays in Windows Media Player with the selected soundfont. VMS does have a "configuration/MIDI mapper" tab where you set it to use your soundfont rather than the built-in Windows one, but you only need to do this once. It really shouldn't take more than 5 mins to set up, then should be ready forever from that moment on. EDIT: Just realized, the first 1 minute and change shows you all you need to know for Windows Media Player and any MIDI sequencer like Sekaiju. Is there any reason you have to use Winamp specifically? SynthFont seems to have a plugin for Winamp where you can select soundfont. 0 Quote Share this post Link to post
DeathWrench Posted October 13, 2022 (edited) Using Polyphone, I made a .sf2 file using each song from the Bucket Head Sigil soundtrack as instruments. Then using FL Studio, LMMS, and SynthFont. I made midi's out of it. All the midi's are is just 1 extended note for the entire duration of the songs. I'm hoping I can get this working on the unity port by replacing the midi's in the wad using slade with these ones I made. Though, If it doesn't end up working. That'll suck. Edit: Didn't work on the unity port, but it was still fun to make anyhow. Edit 2: So uhh, kinda embarrassing, you can just import OGGs to the unity port and they just work, though the main menu is bugged out for some reason; all episodes show up as normal DOOM Episodes till you start and then back out to the main menu, if you load up the game choosing any of the episodes it still loads SIGIL with all the music. My apologies for derailing, just didn't think it would be this easy. Edit 3: I figured out why the main menu was bugging out, it was due to the intro skip mod, having mp4's with a really small length skips to the game before it can load everything. I replaced DLegal with a 5 second blank mp4 and it fixed the problem entirely. Edited October 14, 2022 by DeathWrench update to avoid double posting 0 Quote Share this post Link to post
Sirius104x Posted October 17, 2022 Thank you to Dasho and Doomkid both. VLC player playing soundfont midis, who'd have thought! And I don't need Winamp specifically, but it's just what I use normally for all my music. The Synthfont plugin worked and it's playing the files with various soundfonts I've tested. Still can't quite get it to sound exactly as they do playing it inside GZDoom itself. They are likely tweaking some custom settings within FluidSynth in the game to get it to sound just the way they want. Which I would say sound by far the best compared to any soundfont or player outside of the game, including using the gzdoom soundfont. I may just sit in the game and record the windows audio directly for these, as it seems to be the best sounding for these tracks (Anion Rings from map 12 for example). 0 Quote Share this post Link to post
Graf Zahl Posted October 17, 2022 18 minutes ago, Sirius104x said: Still can't quite get it to sound exactly as they do playing it inside GZDoom itself. They are likely tweaking some custom settings within FluidSynth in the game to get it to sound just the way they want. Which I would say sound by far the best compared to any soundfont or player outside of the game, including using the gzdoom soundfont. It's probably just stuff like chorus and reverb being disabled by default in GZDoom. For strange reasons most software defaults these to on, while switching them off generally sounds a lot better. But no, appearently these are being considered essential parts of the experience. One thing about gzdoom.sf2: This sound font was chosen as a default because it is small, free and doesn't sound like shit. It surely is not the best one avaialble and I'd encourage anyone to try out others - and also try them not only with FluidSynth but also with Timidity++. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.