Universal Dynamic Music Mod

For high-res texture/sprite projects, sprite-fix patches, music add-ons, music randomizers, and other graphic/sound-only projects.
Forum rules
The Projects forums are ONLY for YOUR 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.

Universal Dynamic Music Mod

Postby snackerfork » Mon Nov 30, 2020 9:09 pm

Universal Dynamic Music Mod

This is instructions and a base file for how to build a universal dynamic music mod for Zdoom, which (like in Doom 2016) will automatically play combat music when the player is in combat or has recently been in combat, and play ambient music when all enemies are dead or the player has left combat for a period of time. It is based around Doom 2016 and is intended for use with Embers of Armageddon, but it can be used with any mod and any music from any game (or an arbitrary number of games or music sources).

Since this is based around Doom 2016, it assumes that you have access to the Doom 2016 OST as well as its ambient/miscellaneous tracks, and provides instructions for how to upload them to the PK3. For copyright and bandwidth reasons, no music is provided. The Doom 2016 OST can easily be bought from your music store of choice, and it's not difficult to find the other tracks. Of course, you can use any game's music if you don't wish to purchase the Doom 2016 OST.

Credit goes to Apeirogon, who created the base version of all the code and extensively helped with writing it. Please do not reupload this without crediting Apeirogon and myself.
snackerfork
 
Joined: 29 Jun 2017

Re: Universal Dynamic Music Mod

Postby Dr_Cosmobyte » Tue Dec 01, 2020 5:02 pm

There is another early game which does that, but considering the year (1996), i bet it was made through map sectors and hackery, as doom clones tended to do back then (jump for 3:27 for actual gameplay):



I more than often mention this game, mostly because this was my first FPS game, followed by PSX Hexen and only then the fatidic SNES Doom. But it has a extremely cool soundtrack (often epic and heroic, sometimes dark and moody), and so i think this mini-mod might be a helluva good thing to work with.

Thanks for giving us this!
User avatar
Dr_Cosmobyte
Also known as: GAA1992
 
Joined: 04 Jun 2015
Location: Killing spiders.

Re: Universal Dynamic Music Mod

Postby BROS_ETT_311 » Sat Dec 05, 2020 4:12 pm

Ho boy have I been anxious for something like this. I actually originally found this on the EOA server, but I'm glad that it's posted here as well because this absolutely deserves more exposure.

Anyway, I followed the instructions to the letter using the Doom 2k16 OST and all seems to work as intended...and I must say it's pretty kickass! Only nitpick for me is whenever there's a transition, the music completely fades out before the next track fades in, though that could be just an engine limitation. Ideally, the next track should start fading in just as the previous is about to fade out, so basically an audio crossover.

However, I think this mod would be even more effective if there were a way to both: 1. use a selection of tracks per level (ie. if stems were available), then; 2. this step pertains more to stems, find a way to trigger the tracks to align with the bpm (perhaps by tics? Not sure how feasible this is).

I can actually provide stems from my music pack to tinker with should the idea spark your interest. Regardless, this is a downright amazing tool and can't wait to experiment with more music for it. Thank you for this awesome mod!
User avatar
BROS_ETT_311
 
Joined: 03 Nov 2017

Re: Universal Dynamic Music Mod

Postby XLightningStormL » Sun Dec 06, 2020 8:50 am

BROS_ETT_311 wrote:However, I think this mod would be even more effective if there were a way to both: 1. use a selection of tracks per level (ie. if stems were available), then; 2. this step pertains more to stems, find a way to trigger the tracks to align with the bpm (perhaps by tics? Not sure how feasible this is).

I can actually provide stems from my music pack to tinker with should the idea spark your interest. Regardless, this is a downright amazing tool and can't wait to experiment with more music for it. Thank you for this awesome mod!


A user called Travis was working on something akin to UDMM here: https://forum.zdoom.org/viewtopic.php?f=19&t=61261

Still it'd be nice if there was a way to split battle into "Suspicious" and "Combat" would be useful for mods that have "forgetful" enemies, though the issue is properly detecting how combat is initiated (tokens? Detecting when the player or an entity is attacked by "legal" damagetypes"?

I could also see this being useful as a basepoint for a custom dynamic music controller where you can set specific tracks to specific levels, would be very useful for mappers.
User avatar
XLightningStormL
Former DUSK Wiki Master
 
Joined: 09 May 2016
Discord: XLightningStormL#7461
Twitch ID: XLightmingStormL

Re: Universal Dynamic Music Mod

Postby CaptainNurbles » Wed Dec 16, 2020 10:00 pm

Fuckin' SWEET

I've given this a go and as an experiment I decided to take the battle music from GTFO and split it up into its individual 4 measure bars (The combat music in GTFO is split up into dozens of small tracks just 7.2ish seconds long each and are seamlessly switched around and played in different orders depending on how well the players are doing in combat.)

A good idea in theory, but in practice the script here just takes one of the 7 second loops and plays it over and over again. Is there a way to make it switch randomly between the clips I've thrown into it instead of looping one for forever? I don't know anything about coding and especially ZScript so looking through the code itself is just turning my brain to mush simply by looking at it.

EDIT: Shoulda played with it longer than just a few moments, it does swap around the tracks, but it loops individual songs several times before it fades out and fades into the next. How would I go about removing the looping feature and have it transition seamlessly, with the fadeout removed in favor of just changing songs instantly.
CaptainNurbles
 
Joined: 27 Jan 2018
Location: The Deepest Reaches of Space
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia (Modern GZDoom)


Return to Graphic/Audio Patches

Who is online

Users browsing this forum: No registered users and 0 guests