-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for TRAKINFO #1982
support for TRAKINFO #1982
Conversation
yyjson allows comments and has better error reporting.
What's the advantage of yyjson over cjson? |
yyjson allows comments and has better error reporting. |
@ceski-1 Remix from KEX port is very loud compared to MIDI music. Should we do something about it? |
So, TRAKINFO is a simple assignment from SHA1 of the original MIDI lump to a new music remix lump name? Is there a spec somewhere? |
Yes, it looks like this:
No. TRAKINFO has comments and in a different format compared to the ID24 spec. |
So, we ignore the "MIDI" part and just render MIDI as MIDI instead of playing the pre-recordings? |
Yes, but maybe we should also use the Roland SC-55 recordings. People seem to like them. The nice thing about these SHA1 hashes is that remixed music works with PWADs. For example, Scythe 1 can now use remixed tracks. |
Hi, sorry to barge in, just throwing my two cents in. Since Update 1 dropped for KEX Doom a // O_E1M1
"b292d36331c81e1f2ee4d7bd2938e7fedb39f172" :
{
"volume" : "2.0"
}, |
Yes, I know about that. I was talking about volume relative to a standard MIDI player, e.g. "MS GS Wavetable". We have a "gain" setting in the advanced MIDI menu, maybe we should add gain options for non-MIDI music as well. Perhaps the |
I was thinking of that, to use the // H_E1M1
"09bbd8f7bd85f835ddfe07d366ac4b6e0de96ea3" :
{
"volume": 0.5,
} Another (worse) idea is to just chuck the volume property in the vanilla // D_E1M1
"99767e32769229897f7722848fb1ceccc2314d09" :
{
"volume": 2.0,
} Having a gain setting (beyond also the volume property) may honestly be the simplest way to fix this. |
First, some general observations: notesThe mastering is very poor for the "remix" tracks. They appear to have been recorded too loudly, clipping and distorting the audio, and then adjusted back down but the damage was already done (hence the clipped/flat peaks). The "original" tracks don't loop correctly (they forgot loop markers?) and are even quieter than the raw (uncompressed volume) SC-55 pack's tracks. There will inevitability be false bug reports about broken looping for the KEX "original" tracks, and volume issues in general. There's a few solutions here. We can support the Other notes:
|
They don't have
They already set
Interesting, but it's not going to work for native MIDI, is it?
We don't have any special rules for SC-55 packs or sampled music, it all works like regular WAD lumps. What this PR adds is SHA1 checking of the playing track and replacing it on the fly with the remixed track if the menu option is enabled. I think we should ignore the SC-55 recordings from extras.wad, they are quiet and have no loops. Andrew Hulshult's remix is the most interesting part. |
It is interesting to note that the TNT and Sigil SC-55 recordings have loop tags. |
Yes, but the remix
Agreed. |
With the shift in focus towards Hulshut's remixes, will this mean then, no support for |
Wow, I didn't realise anyone was using it. TRAKINFO is clearly intended for internal use of the KEX port, it is not user friendly and has a different format than the rest of the ID24 specs. @fabiangreffrath , @ceski-1 should we bring back TRAKINFO? |
I'm with @elf-alchemist and believe that not implementing TRAKINFO support would be a missed opportunity. They already provided a valid use case, so the question if anyone else is using it outside the KEX port doesn't even arise anymore. Also, regarding user friendliness, you just added support for the most user-unfriendly HUD description format possible - and yet you are working on an editor and people will start using it in their own mods or configurations. 😆 |
Well, at least it was thought out and designed for the editor from the beginning. TRAKINFO is weird, we have to first calculate a SHA1 hash for the MIDI track, and then another SHA1 hash for the remixed track (which is a big OGG file) just for the |
The sha1 code addition and cjson -> yyjson change still needs to get reflected in the README.md file, please. |
Fixed in c09d881 |
Agreed on how weird and KEX-bespoke the format is. Once I had learned of it being only a SHA1 for a given MIDI lump I started using it on (almost) every single upload I made on the Mod Browser, you can even see on the installation size of any mod I upload that it is always in the dozens of megabytes, because the default GUS MIDI synth sounds... polarizing... they don't have SF2 support, I rendered all tracks in SCC1 Florestan and used Honestly, I do definitely believe in the potential for a more generic and better designed "layered OSTs" feature in the future, but for now, I personally believe plain TRAKINFO will suffice for most use-cases... for now. |
But we do support SF2 and MS GS Wavetable, and it's possible to use Nuked SC-55. We also support the I'm curious about new WADs with alternative soundtracks, can you link one? |
Yes, I was just giving some additional background on me using the lump itself, mostly driven by KEX's shortcomings compared to source ports. I do believe the use-cases for Woof will be fewer, though no less genuine.
My compilation of Dr. Sleep's Inferno has it's normal MIDI selection, rendered "Original" tracks and Aubrey Hodges' PSX OST as "Remixed" tracks. And a friend of mine has uploaded Doom 64 for Doom II with it's default OST, the rendered version as "Original" and a tracker |
third-party/CMakeLists.txt
Outdated
|
||
add_library(spng STATIC spng/spng.c) | ||
target_woof_settings(spng) | ||
target_compile_definitions(spng PRIVATE SPNG_USE_MINIZ INTERFACE SPNG_STATIC) | ||
target_include_directories(spng INTERFACE spng) | ||
target_link_libraries(spng miniz) | ||
|
||
add_library(yyjson STATIC yyjson/yyjson.c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a libyyjson package in Debian. Could we please first try to build against the system package before our own vendored copy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MSYS2 doesn't have it. We also need the latest version for better error reporting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will I have to change to prefer the system libyyjson for the Debian package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will I have to change to prefer the system libyyjson for the Debian package?
Quite a lot I think. We can choose other library, e.g. https://github.com/akheron/jansson
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the library itself. I just don't want to receive bug reports against the Debian package, because I use a code copy and not the system library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, Debian is tough 😄 Okay, I'll try to add searching for system package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 4703897
@@ -2502,6 +2504,10 @@ static void RestartMusic(void) | |||
S_RestartMusic(); | |||
} | |||
|
|||
static const char *extra_music_strings[] = { | |||
"Off", "Remix", "Original" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: "Off", "Original", "Remix"
seems more appropriate for Woof.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the order from the menu in the KEX port. I think most users want "Remix", "Original" sounds a lot like "MS GS Wavetable" anyway.
src/s_sound.c
Outdated
BIND_NUM(extra_music, EXMUS_REMIX, EXMUS_NONE, EXMUS_ROLAND_SC55, | ||
"Extra soundtrack (0 = Off; 1 = Remix; 2 = Roland SC-55"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Rename "Roland SC-55", EXMUS_ROLAND_SC55
, and related vars/strings to "Original", etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in e5a555a
src/d_main.c
Outdated
@@ -1827,6 +1828,12 @@ void D_DoomMain(void) | |||
// [FG] emulate a specific version of Doom | |||
InitGameVersion(); | |||
|
|||
char *extras = D_FindWADByName("extras.wad"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add any checks here? The name is too simple, there was also a version for the Unity port.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't hurt to auto-load it even if it doesn't contain what we expect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't hurt to auto-load it even if it doesn't contain what we expect?
Probably won't. But we need -noextras parameter just in case it annoys some users (for example, it contains DSSECRET sound or icons for weapon rolette).
Perhaps we need to autoload extras.wad