[No] Checksum for Music

Moderator: GZDoom Developers

Checksum for Music

Postby Vash Bivingdale » Mon Dec 30, 2019 12:10 pm

Is it possible to generate an md5 (or other type of checksum) for music files, and then expose this information to ZScript?

This would allow a mod/patch to dynamically look for specific songs, such as popular MIDI's used in many PWAD's (or from the IWAD's), and allow scripting to perform an action, like typing the song title on screen, or triggering some other event.
Vash Bivingdale
 

Re: Checksum for Music

Postby Chris » Mon Dec 30, 2019 4:39 pm

Vash Bivingdale wrote:This would allow a mod/patch to dynamically look for specific songs, such as popular MIDI's used in many PWAD's (or from the IWAD's), and allow scripting to perform an action, like typing the song title on screen, or triggering some other event.

For the song tile, it might be better to have a way to get that from the song's metadata instead of hardcoding an md5-to-title lookup table. Though either way, I think this would cause more problems considering a different md5 checksum doesn't necessarily mean a different song (a FLAC recompressed to Vorbis, a MIDI prerendered to FLAC, etc; or a slight modification to the MIDI causing it to no longer be recognized). I'm also not sure why you would want to trigger or not trigger an event based on whether the song that plays matches a known checksum, it would be easy to (un)intentionally cause trouble for people that want to use modded music.
User avatar
Chris
 
Joined: 17 Jul 2003

Re: Checksum for Music

Postby Graf Zahl » Mon Dec 30, 2019 4:53 pm

Chris wrote:it would be easy to (un)intentionally cause trouble for people that want to use modded music.


Count me among those. I cannot see much use here but a lot of abuse and even more accidental misuse.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Checksum for Music

Postby Matt » Mon Dec 30, 2019 10:39 pm

I can't imagine a single use for this that couldn't be better done by replacing the music in the wad the usual way or playing music using a script.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Checksum for Music

Postby Gez » Tue Dec 31, 2019 4:51 am

The problem with using song metadata is that there's no metadata in MUS files, and quite often the only MIDI metadata you find in MIDI files used in wads is something like "Converted by QMUS2MID by Raphael Quinet" because people converted the original MIDI to MUS, and then back to MIDI, and then again to MUS and again to MIDI several times like goddamn lunatics. (I blame old editing tools.)

There is merit in making up a database of MUS and MIDI checksums to help identify frequently used songs. It's something I do with SLADE by having a huge zip of MIDIs (originally built from Jimmy's jukebox, to which I've added a lot of stuff) and using its "find duplicate entry content" feature, so I can copy some mystery MIDI in it and then find out if they're duplicates of known stuff. And yes it means that for some songs I have to keep several versions around (MIDI original, MUS conversion, frequent MIDI conversion #1, frequent MIDI conversion #2...).
Gez
 
 
 
Joined: 06 Jul 2007

Re: Checksum for Music

Postby Graf Zahl » Tue Dec 31, 2019 4:58 am

And even if that was done, there's no point exposing the checksum to scripting. If we had a metadatabase scripts should be able to query that instead of having to do all the work themselves.
And this doesn't even begin to consider the multitude of CD rips that get used as MP3 or Ogg. There's simply no way to catalog all potentially used music because for each song there's bound to be multiple variants.


Exposing the checksum to scripting reminds me of that old ACS networking thing that was a hot topic among the less technically informed.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Checksum for Music

Postby Rachael » Tue Dec 31, 2019 5:00 am

I think the author's intent here was to replace commonly distributed bad quality songs with better masters/remasters of said tracks, and possibly with the avoidance of what Gez mentioned for mus>mid>mus>mid cycles.

For instance there might be a copy of "jingle bells.mus" that landed on the internet in the mid-90's that might've been renamed D_RUNNIN in one wad, and D_STALKS in another - I think the author of this feature request wants to be able to identify that particular lump by its checksum, no matter what it happens to be named, in order to replace it with his own higher quality version. That exact file which may theoretically be duplicated on multiple wads under different lump names, not necessarily what the actual song in it happens to be called.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Checksum for Music

Postby Graf Zahl » Tue Dec 31, 2019 5:03 am

In that case the place to do it is SNDINFO, e.g. $musicalias filesize checksum realfile.whatever. (Filesize is important!) It still has no business in the scripting interface.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests