Long time reader, first time poster here.
Recently i made a simple mod for my own needs and decided to share it with you guys.
Dunno why but BBCode is off in this subforum but if you want to read formated text here is Github project: https://github.com/Xcommand/ZDoomMusicplayer
Dynamic Music Player!
If you are tired of listening to the same map music tracks (especially on maps that take more than 5 mins to beat) or manually changing music via console commands, this mod automates everything by building a dynamic, real-time playlist directly from your loaded files.
Whether you are running classic WADs or heavy PK3 megamods, this scanner crawls through your loaded lumps (.wad/.pk3 files) and puts together a fully interactive playback music system.
But the best feature here is that you can add your own music files to playlist without any modding experience!
Key Features:
Smart Lump Scanning:
Automatically detects and filters classic tracks (starting with "D_" prefix) and any external audio files located in the music/ directory.
Format Filtering:
Features a file format filter in options menu so you can choose exactly what you want to hear:
*Play everything (MIDI and Digital)
*MIDI-only mode
*Digital-only mode (.ogg, .mp3, .flac)
Shuffle & Repeat:
Options menu support (music_player_shuffle and music_player_repeat) to randomize your tracks or keep your favorite jam on loop in case you want to keep original music behavior but still be able to change tracks on the fly.
Playback History:
Remembers up to your last 50 played tracks so you can comfortably skip backward without getting lost.
Keybinds:
Fully bindable commands (mp_nexttrack and mp_prevtrack) via controls menu for seamless skipping mid-firefight.
Smooth "Toast" HUD Notifications:
Whenever a track changes, a "Now Playing: [Track Name]" notification smoothly drops down from the top-center of your screen and fades away after 3 seconds. Completely unhooked from standard console printing for maximum immersion.
How it works:
After loading this mod it scans loaded files and builds a temporary playlist of midi/mp3/ogg/flac files it has found in /music/ folder (or if you have .wad files loaded, it directly searches for "D_" prefix and any supported file formats)
In case you change what format to play in mod options it rebuilds playlist and removes unwanted file format from playlist or adds it back in case you select "MIDI+MP3/OGG".
It runs on a robust StaticEventHandler that safely processes input events on the UI layer, and renders the HUD notifications perfectly centered on any display resolution without relying on version-dependent ZScript UI flags.
Console Variables & Commands:
music_player_format (0 = All, 1 = MIDI, 2 = Digital)
music_player_shuffle (0 = Linear, 1 = Shuffled)
music_player_repeat (0 = Next Track on End, 1 = Loop Current Track)
Bind mp_nexttrack / mp_prevtrack in game options -> controls menu.
How to use:
Just add "MusicPlayer.pk3" after any mod that has music in it or at the end of your mod load order. Everything that loads after MusicPlayer won't be added to music playlist.
Want to add your music?
You don't need to make any .wad or .pk3 files to add your music! Just add any folder to your mod load order that has /music/ inside and mod will add every playable file (.midi, .ogg, .mp3, .flac) that is inside (It also searches inside subfolders)
Some examples:
In case you use ZDL or similar launcher here is an example of my load order
MonsterFallDamageZ.pk3
bullet-time-x.pk3
lexicon-beta-build-133.pk3
lexicon-slaughter-v1.0.pk3
lexicon-miscdata-beta-build-133.pk3
DoomMetalVol5_44100.wad
VLT_PBR_POM - RC2GZ.pk3
BrutalDoomPlatinum-4.1dev.pk3
flashlight_plus_plus_v9_1.pk3
smpb-v1.2.pk3
lights.pk3
jp_smoothwater.pk3
NiceWallBlood.pk3
D:/Discography/ <--- this is where i put all my custom music. It has folder /music/ inside with different subfolders where all my custom .mp3 files located.
MusicPlayer.pk3
I have tested it on GZDoom 4.10.0/4.14.1 and on UZDoom 4.14.3/5.0.0 and it works fine.
Download link v1.1: https://github.com/Xcommand/ZDoomMusicp ... Player.pk3
Download link v1.0: https://github.com/Xcommand/ZDoomMusicp ... Player.pk3
Tried to test it in Heretic, but it doesn't load default game music since heretics default music prefix is MUS_ instead of D_. But it still works if you load your own custom music folder!
[minimod][v1.1]Dynamic Music Player!
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
- Xcommand
- Posts: 3
- Joined: Sat Aug 08, 2026 2:00 am
- Operating System Version (Optional): win10
- Graphics Processor: nVidia with Vulkan support
- Contact:
[minimod][v1.1]Dynamic Music Player!
Last edited by Xcommand on Wed Aug 12, 2026 3:40 am, edited 1 time in total.
- PokeParty445
- Posts: 28
- Joined: Sat Oct 03, 2020 4:06 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: United States
Re: [minimod][v1.0]Dynamic Music Player!
Wow this is really cool just conceptually and it's even cooler seeing it just work with any files I want, but through my (admittedly little) amount of testing I do have some suggestions.
1. A cvar to disable using wad provided music would be nice. From my testing with just the Doom 2 IWAD, the D_ tracks always play no matter what setting I have the format set to. I'm not sure if that's intentional or not, but even if it isn't, a toggle would be nice so I could provide my own MIDI files and not have the wad MIDIs interspersed in the MIDI files I chose.
2. An option to have going to the next map play the next track as well, essentially letting this function as a dynamic version of various jukebox mods that do the same thing. This one isn't as big of a deal, admittedly I can just press the next track button when the next map starts, but it would be convenient nonetheless!
EDIT: I did a little more testing and I noticed that with the Doom 2 IWAD the D_ files are not actually even considered MIDIs, but instead as digital tracks, I imagine because they are actually MUS files in the wad and not MIDI files, my mistake! Still though, at the moment Doom 2's regular tracks do get mixed in with any playlist that includes digital music (such as MP3s), so a fix for that and/or some way to toggle the wad provided music on or off would still be nice.
1. A cvar to disable using wad provided music would be nice. From my testing with just the Doom 2 IWAD, the D_ tracks always play no matter what setting I have the format set to. I'm not sure if that's intentional or not, but even if it isn't, a toggle would be nice so I could provide my own MIDI files and not have the wad MIDIs interspersed in the MIDI files I chose.
2. An option to have going to the next map play the next track as well, essentially letting this function as a dynamic version of various jukebox mods that do the same thing. This one isn't as big of a deal, admittedly I can just press the next track button when the next map starts, but it would be convenient nonetheless!
EDIT: I did a little more testing and I noticed that with the Doom 2 IWAD the D_ files are not actually even considered MIDIs, but instead as digital tracks, I imagine because they are actually MUS files in the wad and not MIDI files, my mistake! Still though, at the moment Doom 2's regular tracks do get mixed in with any playlist that includes digital music (such as MP3s), so a fix for that and/or some way to toggle the wad provided music on or off would still be nice.
- Xcommand
- Posts: 3
- Joined: Sat Aug 08, 2026 2:00 am
- Operating System Version (Optional): win10
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: [minimod][v1.0]Dynamic Music Player!
Thx for feedback! Believe it or not but all this recursive "search/add to array" stuff i made in 2010 for my FPS project. I just reused part of code from my "material behaviour" where it recursively assigns texture properties based on folder structure (I just didn't want to go thru every texture and set it's params like "wood" "metal" and etc.)
Cvar to disable default wad music is a nice touch, but since i was using DoomMetal.wad every time (that has doom1 and doom2 ost remade) i didn't even bothered about it. I guess it's won't be a problem to do it, since when i was testing it in Heretic, game doesn't gave me any errors even when it wasn't able to find any "playable" music and playlist had 0 songs, lol.
I had in mind that "Next map->Next track" idea but sometimes right before i exit level there is some banger begins to play and i just left it as is. It won't be a problem to add mp_nexttrack at the start of next map.
Your suggestions also gave me an idea about adding "ignore list" to options menu containing loaded wads/pk3 list where you can turn on/off something that you don't want to have in your playlist. And maybe add another keybind like "ignore song" that will be also added to "don't play that" list in options menu, where you can see what tracks isn't on the playlist or in case you want to add it back (in case you added your fav song by mistake to that list).
And since i can't send any PM's as a "just registered user" i will put that here: AI was used only to explain me how to get info from loaded wads in GZDoom. All of the code is my own created back in 2010 all i had to do is repurpose it from C# for GZDoom as an music player (which means that what i was called ScanLoadedMats() now is ScanLoadedLumps() and etc. Also removed ton of my commented swear words and only adding comment sections to "quick jump to" when i was fixing errors and tracing bugs.
Cvar to disable default wad music is a nice touch, but since i was using DoomMetal.wad every time (that has doom1 and doom2 ost remade) i didn't even bothered about it. I guess it's won't be a problem to do it, since when i was testing it in Heretic, game doesn't gave me any errors even when it wasn't able to find any "playable" music and playlist had 0 songs, lol.
I had in mind that "Next map->Next track" idea but sometimes right before i exit level there is some banger begins to play and i just left it as is. It won't be a problem to add mp_nexttrack at the start of next map.
Your suggestions also gave me an idea about adding "ignore list" to options menu containing loaded wads/pk3 list where you can turn on/off something that you don't want to have in your playlist. And maybe add another keybind like "ignore song" that will be also added to "don't play that" list in options menu, where you can see what tracks isn't on the playlist or in case you want to add it back (in case you added your fav song by mistake to that list).
And since i can't send any PM's as a "just registered user" i will put that here: AI was used only to explain me how to get info from loaded wads in GZDoom. All of the code is my own created back in 2010 all i had to do is repurpose it from C# for GZDoom as an music player (which means that what i was called ScanLoadedMats() now is ScanLoadedLumps() and etc. Also removed ton of my commented swear words and only adding comment sections to "quick jump to" when i was fixing errors and tracing bugs.
- Xcommand
- Posts: 3
- Joined: Sat Aug 08, 2026 2:00 am
- Operating System Version (Optional): win10
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: [minimod][v1.1]Dynamic Music Player!
So after some trial and errors about how GZdoom and Zscript handles CVars and long file names i managed to implement this:
- .MUS file format now treated as .MIDI
- Music changes upon entering new map
- Option "Don't use iWad music"
- Additional keybind "mp_ignoretrack" that adds current music track to "Ignore Track" list.
- Ignore options menu that has toggleable list "Ignore WAD/PK3" and "Ignore Track" list where you can see what you have added and can bring back to playlist.
Here is latest v1.1 version: https://github.com/Xcommand/ZDoomMusicp ... Player.pk3
- .MUS file format now treated as .MIDI
- Music changes upon entering new map
- Option "Don't use iWad music"
- Additional keybind "mp_ignoretrack" that adds current music track to "Ignore Track" list.
- Ignore options menu that has toggleable list "Ignore WAD/PK3" and "Ignore Track" list where you can see what you have added and can bring back to playlist.
Here is latest v1.1 version: https://github.com/Xcommand/ZDoomMusicp ... Player.pk3
Last edited by Xcommand on Wed Aug 12, 2026 3:44 am, edited 1 time in total.