Generic Header Creator by manakoAT at 5:48 AM EDT on June 22, 2008
Here is the Generic Header Creator!
What is GENH? GENH is a Header Format that allows you to append Various Streamed Music to a Generic Header, playable with vgmstream in Winamp!
Why do i need this? There are many games that doesn't use headers for theyre music, basically this header was designed for headerless PS2 ADPCM to make it playable with Loop, but now it supports PS2 ADPCM, XBOX WAVM, NGC ADP/DTK, and PCM RAW! So, if you want looped files that are headerless, simply add a GENH to this file! :o)
Excuse any ignorance , but yeah how is it implemented into vgmstream or supported.. Does the plugin read through the .dat on your webpage etc.. Just curious :) Sorry to bother ^_^ I did notice with conan etc.. naming to .genh it played back quite well :)
No. GENH is a header. See here (specifically #10) and perhaps here for a little information on what a header is (in case you don't know). While that doesn't give you many details, it does essentially get the point across. GENH is a header that is added to a file type that normally has no header information. Many PS2 formats can be identified without a header. Even though they can be identified, there's still missing information, due to the lack of a proper location to discern this information. That's where GENH comes in. The ripper views the original non-headered file and using experience and intuition they are able to discern this missing information. This gleaned information is then put into a GENerated/GENeric Header so that VGMstream can know how to handle the file. As HCS said: "The important thing to note is that it is a header which we control, so we can add the details that are missing from the files themselves." Or as anewuser said: "genh is a header/information on how to thread a file that has no information on how it should be played." Both are essentially correct, and provide additional insight into the "format."
Renaming a file will be useless. Sure, it may play in VGMstream, but it will be playing incorrectly. You need to generate a header for the file, and attach that header for it to be of any use.
In short - GENH is implemented into VGMstream just as any other format is. Except that, as HCS said, "we" (I use that term loosely here) control it. ManakoAT's DAT (and anyone else's for that matter) has nothing to do with it at all. I hope that clarifies things. Mouser X over and out.
Here's another example, from the Xenosaga: The Animation Original Soundtrack, Turned into RAW Playstation 4-bit ADPCM (im not saying how i did it because it shouldn't be done ;) ) then to GENH for looping
Another example, from Xenosaga Episode I: Der Wille zur Macht. Working on the PSF2 set is going nowhere for me due to the strange japanese naming of the files and possibly the brick wall that might appear later due to the game using the Suzuki Sound Driver might throw me off. This GENH file was made from Playstation 4-bit ADPCM converted from the Original Soundtrack and then turned into GENH for looping. (Like i said, i shouldn't be doing this due the rules of ripping sets, etc., etc. and because people might get confused and think the file (before turned into GENH) might have came from the game itself.) After using the GENH Creator for a while (months of testing and all that) it becomes very easy to use and it isn't very complicated.
Here's a treat for everyone: from (PS2) Kingdom Hearts Re:Chain of Memories Original Soundtrack 04 - Yoko Shimomura - Hand in Hand.GENH My loop actually sounds better and smoother than the loop found in the soundtrack :P
i like my ps2 adpcm, mp3 loop sample counting tires me out and takes me a bit longer (just a bit) to get the right loop sample numbers. I like to have fun with these nice formats, right? ;) besides, i don't want anyone to make genh sets out of stuff they convert and releasing them to the public. Little examples,...maybe, but i'm not supporting the idea of people converting stuff to ps2 adpcm, or etc., just use GENH to loop your mp3s :P.
btw, no, this song was originally sequenced but i used the soundtrack seeing that a set is not ripped.........yet
Gotcha. Keep being awesome. :) By the way, I don't know how you go about converting an MP3 to ADPCM (not that I ever would,) but doesn't that significantly reduce the quality?
Off-topic, but are you into the whole PSF2 ripping thing? Because that would make you awesome X 2.
I know a little about PSF/PSF2 ripping and tried it before. I know more in 2SF riping. Sequences are nice :)
By the way, I don't know how you go about converting an MP3 to ADPCM (not that I ever would,) but doesn't that significantly reduce the quality?
hmm, i don't think so, maybe it does, but the human ear won't be able to hear the difference if you use an MP3 encoded at 320kbps and turn it into PS2 ADPCM. Besides, ADPCM has a higher bit rate than MP3, around 400 or so im guessing, maybe more.
Humorously enough, I don't "need" it now that the Castlevania Judgement BRSTMs are floating around and I don't have to loop my MP3 collection. Still, it's nice to have the software for future use.
Edit: I forgot to mention that I love the fact that this program exists. It's great to be able to customize streams like that. The only thing I might change is to have a few bytes in the header specifying where the end of the data stream is so something like a PSF tag might be stuck on the end. (I actually made something like that for ADX files, but nothing ever came of it. I'd be glad to help in any way if this seems like something you'd like to do.)
I'm a bit late to catch onto the MP3 support... awesome work as always, manako. :)
"...PSF tag might be stuck on the end. (I actually made something like that for ADX files, but nothing ever came of it)."
I think that's a pretty damn good idea. Now, if we could get the ball rolling with an ADX tagger... and who can forget, ADX tag support in VGMstream ;P
The only thing missing header-wise is a byte like PSF files have, telling the starting byte of the tag. Slapping the tag itself on the end of the file is pretty trivial.
I mentioned I'd done something like this before. It was an ADX tagger. There was no modification to the header, so the tag was simply stuck on the end of the file and thus, in_cube played the file fine (vgmstream didn't exist at the time). The problem was that I was using the tags for display on IRC; what that meant was that my script had to load the end of the file into RAM, find "TAG", and parse from there onwards, since there was no convenient "tag starts here" byte in the header. This, of course, meant that tag reading was terribly slow, since I loaded something like 2MB into RAM in order to accommodate for ridiculously long tags. It was sloppy, but I know of at least one person who tagged a good portion of his ADX collection with it, so I think it'd be useful if done properly.
Implementation in vgmstream would likely be trivial, too, since the tags are so straightforward and that byte will be there telling it exactly where to start reading -- and it's not like hcs hasn't dealt with PSF tags before, anyway.
a) If you want to stick the tag on the end you could use a backwards format, with the signature and header physically at the end and offsets and sizes relative to the end. Wouldn't be any less efficient than a normal header. b) I've dealt with PSF tags only though Neill's PSF tagging code. c) There aren't plans to include any support for purely informational metadata in vgmstream, though I suppose if someone sends me a well-written patch I'll consider it.
Hi, hcs. I didn't mean to come across sounding like I was taking for granted that you'd blindly add any old thing to vgmstream, if I did. I was just throwing around ideas. If this does get made and added, that would be great.
That "reverse header" idea is a good one. It'd be much easier to make the "footer" a specific length and have my script look at the last x number of bytes instead of what I was doing. I don't know why I didn't think of that myself.
And for some reason, it didn't occur to me that you didn't code the tagging stuff yourself. Again, I didn't mean to assume things, I was just excited at the prospect of tag reading.
If it would be of aid to anyone, I could fix up my tag-reading/writing mIRC script to use the "reverse header" idea and post it here. Granted, it's only an mIRC script, but perhaps a coder with more knowledge and inspiration could make some useful utility out of it -- or point me to a good resource to learn the proper c++/java/whatever to do it myself.
These files are supposed to be playable in vgmstream, are they not? As of whatever version of vgmstream was up 10 minutes ago, the only GENH I've gotten to play is one I made from an MP3, and even that ignored the loop points -- meaning Winamp has no idea what to do with these or recognize them at all. I don't see GENH in the File Types list (or the "files of type" dropdown menu in Add File), either. Is there some setting or file I'm missing?
Umm......the best thing to do is get the latest in_vgmstream plugin (if not done so). Also, make sure you have the necessary dlls (check readme) placed in winamp's main directory.
this seems to be an unsupported IMA type, the first bytes are looking weird, normally they're something like 0x80, not 0x08m maybe a "reversed" type...
Currently Supported Formats: 0x00 - PlayStation 4-bit ADPCM 0x01 - XBOX 4-bit IMA ADPCM 0x02 - GameCube ADP/DTK 4-bit ADPCM 0x03 - PCM RAW (Big Endian) 0x04 - PCM RAW (Little Endian) 0x05 - PCM RAW (8-Bit) 0x06 - Squareroot-delta-exact 8-bit DPCM 0x07 - Interleaved DVI 4-Bit IMA ADPCM 0x08 - MPEG Layer Audio File (MP1/2/3) 0x09 - 4-bit IMA ADPCM 0x0A - Yamaha AICA 4-bit ADPCM 0x0B - Microsoft 4-bit IMA ADPCM 0x0C - Nintendo GameCube DSP 4-bit ADPCM 0x0D - PCM RAW (8-Bit Unsigned) 0x0E - PlayStation 4-bit ADPCM (with bad flags) more to come...
There are some special options, like an Interleave and Loop Finder for PSx ADPCM, a "Capcom Hack" for a different coef layout in some Capcom games, like Viewtiful Joe, Resident Evil 4 and possibly more...
Further, it includes some nice "autoget" features, for example: if you select a wav file it will retrieve all needed infos, i'll work more on this support, it saves a lot of time.
It would be nice if someone could test it, and i'm open for any suggestions!
cU mana
by RebeccaSugar at 5:42 PM EST on February 28, 2015
Would this still be around somewhere? I've got a few headerless files lying around and would be more than happy to test this for you after more than five years.
This is now part of VGM Toolbox (forum thread here). It's how people make GENH files for rips these days. GENH is used for when the rips have no header, or the header is incorrect, or just plain useless/missing important data. There has been occasional discussion on using a GENH header to store tag data, but no one has agreed on a standard, and no one has stepped up to do the software programming necessary for it.
Anyway, basically this is a really old thread, and out dated. VGMTb can do this, and is not only updated more, but supports features this old tool doesn't. Mouser X over and out.
edited 12:31 AM EST March 1, 2015
by RebeccaSugar at 7:30 PM EST on February 28, 2015