More than one custom GENMIDI lump and ways to handle them

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Csonicgo
Posts: 1193
Joined: Thu Apr 15, 2004 3:28 pm
Location: Leeds

More than one custom GENMIDI lump and ways to handle them

Post by Csonicgo »

I'm working on GENMIDI lumps for a project with many MIDI tracks , all of which use different drumkits for each track. GENMIDI lumps only have room for one drum kit, so any midis which would use another type would still sound the same. Currently (or as far as I know) ZDoom only allows one GENMIDI lump to be loaded, the lump labelled GENMIDI.

I am requesting a way to define which OPL patch to load based on the current map, OR on demand. This would allow me to make custom patches that are not only different drum sets, but also have a similar set-up to Descent where I could load in a completely different set of instruments per level. This would require some extra functions, obviously, so I propose "dmxpatch" for MAPINFO and SetDMXPatch() for scripts. SetDMXPatch() should only trigger when the music changes.

An example in MAPINFO:

Code: Select all

map MAP01 "Grandpa Found The Car Keys" {
    sky1 = "CITYSKY2", 0
    music = "CITYMUS"
    dmxpatch = "DMXCITY"
}
An example in ACS:

Code: Select all

Script 100 (int tid) // Boss battle
{
   SetDMXPatch("DMXBOSS"); // Load DMX patch , would listen for a SetMusic
   SetMusic("BosFight", 0);

   ACS_Execute(666, 0, tid, 0, 0); // Starts a health tracker for the boss

   while (ThingCount(T_NONE, tid) > 0) delay(35);

   SetDMXPatch("DMXCITY"); // Restore the default patch
   SetMusic("*", 0); // Restore the level's default music
}
I have no idea how hairy the music code is in ZDoom as I only know Chocolate Doom's music code, so I don't know if this is possible or not - but this would be hella handy.
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: More than one custom GENMIDI lump and ways to handle the

Post by Gez »

[wiki]SNDINFO[/wiki] might be where it'd make the most sense. A variant of $mididevice where you set default params for MIDI songs without forcing the use of a synth over another?
User avatar
Csonicgo
Posts: 1193
Joined: Thu Apr 15, 2004 3:28 pm
Location: Leeds

Re: More than one custom GENMIDI lump and ways to handle the

Post by Csonicgo »

Gez wrote:[wiki]SNDINFO[/wiki] might be where it'd make the most sense. A variant of $mididevice where you set default params for MIDI songs without forcing the use of a synth over another?
Oh yeah, I completely forgot about that. In Discord we were discussing the possibility of changing the patch set on the fly for different areas of a map, but that would require exclusivity to OPL emulation for those music selections.
Post Reply

Return to “Feature Suggestions [GZDoom]”