The idea is that the path name often changes. So the MD5 is a more robust way of identifying the file in question. So it's possible to extract the song length even if the file was not loaded from within the HVSC, as long as the MD5 is in the DB.
<?xml version="1.0" encoding="UTF-8"?> <SID type="RSID"> <Header> <LoadAddress="0000"> <InitAddress="4000"> <PlayAddress="0000"> <Songs="20"> <StartSong="1"> <Name="Arkanoid"> <Author="Martin Galway"> <Released="1987 Imagine"> <RelocStart="0000"> <RelocPages="00"> <Flags> <!-- 0 = built-in music player, 1 = Compute!'s Sidplayer MUS data, music player must be merged. --> <Format="0"> <!-- 0 = C64 compatible, 1 = PlaySID specific (PSID v2NG) 2 = C64 BASIC flag (RSID) --> <Player="0"> <!-- 0 = Unknown, 1 = PAL, 2 = NTSC, 3 = PAL and NTSC. --> <Clock="1"> <!-- 0 = Unknown, 1 = MOS6581, 2 = MOS8580, 3 = MOS6581 and MOS8580 --> <SidModel="1"> </Flags> </Header> <STIL> <Author> <Comment="Martin Galway's own comments are denoted (MG). 'I will never do rearrangements of those tunes on other instruments, the SID is what they're meant to be heard on. It would not be 'updating' them to put them onto a different instrument. If you ever hear music from me on today's instruments, the tunes will be all-new (and probably a lot better).' (MG)"> </Comment> </Author> <SID> <Comment="This is the very first published tune on the C64 that used samples. 'I'm glad you spotted 'Cobra' on the Spectrum, whose tune I was in love with and HAD to use somewhere else...! I figured no-one would complain if I used it a year later on the C64.' (MG) (It got used in Arkanoid.) 'Q: How did you get involved with using sampled sounds? MG: I figured out how samples were played by hacking into someone else's code... OK, I admit it... It was a drum synthesizer package called Digidrums, actually, so you could still say I was the first to include samples in a piece of music. [...] Never would I claim to have invented that technique, I just got it published first. In fact, I couldn't really figure out where they got the sample data, just that they were wiggling the volume register, so I tried to make up my own drum sample sounds in realtime - which is the flatulence stuff that shipped in 'Arkanoid'. [...] After the project was in the shops I gained access to some real drum samples, and I slid those into my own custom version of the tune. The one that's in the shops is kind of a collage of farts & burps, don't you think? [...] Later I was able to acquire some proper drum samples and by 'Game Over' it got quite sophisticated.' (MG)"> </Comment> </SID> </STIL> <Songs> <Song1> <Length="2:22"> <STIL> <Title="Cobra (Title) [from the Spectrum game]"> <Artist="Martin Galway"> <Comment="'I'm glad you spotted 'Cobra' on the Spectrum, whose tune I was in love with and HAD to use somewhere else...! I figured no-one would complain if I used it a year later [for Arkanoid] on the C64.' (MG)"> </STIL> </Song1> <Song2> <Length="1:17"> <STIL> <Title="Hiscore [from the arcade game Arkanoid - Revenge of Doh]"> <Artist="Hisayoshi Ogura (OGR/Zuntata)"> </STIL> </Song2> </Songs> <Binary> (Binary code goes here) </Binary> </SID>
TBH I'm not a fan of XML. I think it's overused, and definately not the best approach for this IMO. What with wanting to keep this small for memory constrained devices.