MANY gehn to add to PCM by permic at 7:09 AM EST on January 17, 2018
Hello. I got this problem. I have ~ 3000 PCM chunks. To test/evaluate order (they are scrambled -chunk #233 goes to #241, then to #234, then to #240, ...,so on), I need to listen to each one of those chunks. In order to do that, I need to add GEHN headers for them to be playable. (Originally, chunks were part of the same file, BUT audio is NOT sequential, SO my idea was to split big file according to interleave x2 size & sort them & arrange them by listening) 24000 Hz, 16-bit, stereo, interleave=0x18000. The chunks are 180 KB size. Nearly 700 MB of all files, that represent sound/music. I need a batch process for this, but VGMt does not seem to cooperate. Any ideas?
Build GENH files for Technic Beat data by permic2 at 4:57 AM EST on January 22, 2018
(I forgot my password so I created a new accout with a more easy2remember password)
I ditched this game (Technictix). I got the "updated", more completed version instead: Technic Beat (US) [slus.21019] The file structure is the same, so the previous findings applies to this game too.
Up to now, I discovered:
* The music is PCM RAW L.E. (just by testing with the GENH header in vgm.t, read below)
* Interleave size is 0x17700: /* I listened to each chunk (size is multiple of 0x800), using a chronometer I measured duration to be ~2 seconds. /* Upon close inspection, between chunks (or, the LAST part of each chunk), there would always be 0x200 bytes of full-zeros, indicating no.music, or space for PCM junction/concatenation, maybe. /* As PCM is 2-bytes & 24000 Hz per channel, making t= 2 sec. of duration meant 2*2*24000 = 192000 (0x2EE00) bytes per chunk, EXACTLY 0x200 less than the next 0x800-multiple (and next sector & next chunk). /* As stereo PCM is (mostly) interleaved, I simply divided the data: 0x2EE00 / 2 = 0x17700, the interleave size. Then I just had to discern between B.E. or L.E. endianness with vgm.t, and voila! -> the chunks of data are full music (now 2.000000... seconds duration).
* I used ACOF (Advanced Cutter/Offset Finder) to split the data in [PS2.DAT] (starting from some FFFFFF... bytes meaning boundary/garbage/something), searching for 0x200 '0000000....'. To my surprise (not more for the veterans, though), all the remaining of the .DAT file was PCM data! So there goes ~ 1 GB of music! Moreover, starting offsets were always a multiple of 0x800 (and I put that in the offset mod []=[] function too, to ease splitting)
The, the problem: the PCM data is NOT sequential: music of chunk#123 is NOT followed by music of chunk#124; it is as if music data jump here to there to here... i.e., a mess. Only progress to this, is that proximal n-chunks (let's say, example these 56 consecutive chunks) represent the SAME, WHOLE track, on listening. 119 tracks in total.
So, I need the help of a programmer to help with concatenating these same-track chunks.
Let me give an example, for the first track.
The first 30 0x2EE00-bytes chunks belong to the first track. Let's call [x###] those chunks. In the .DAT file the chunks are arranged like this: <b> [x001][x002][x003][x004][x005][x006] [x007][x008][x009][x010][x011][x012] [x013][x014][x015][x016][x017][x018] [x019][x020][x021][x022][x023][x024] [x025][x026][x027][x028][x029][x030]</b> Listening to the chunks in this order would not produce the music. The order in which these chunks must be listened (played) for there to be any proper music-track is this: <b> [x001][x003][x005][x007][x009][x011] [x013][x015][x017][x019][x021][x023] [x025][x027][x029][x030][x028][x026] [x024][x022][x020][x018][x016][x014] [x012][x010][x008][x006][x004][x002]</b> Notice the "alternating/skewing/jumping" pattern there.
For the next (#2) track, there are the next 58 chunks that build it. Likewise, the order in which the chunks should be played (& merged in one-PCM) would be: [0x031][0x033][0x035][0x037]...[0x087][0x088][0x086][0x084]...[0x036][0x034][0x032]
And so on, for the next ~ 5500-ish chunks !! Merging these PCM chunks into one PCM-per-track is definitely NOT a task that should be done manually - it needs programming skills: extraction of data + arrangement of the extracted data. With VGM.t I can deal (did it!) with the first process, but NOT with the second.
Another observation: those 0x200 zero-bytes between chunks MUST interefere with the playing of music, creating ugly clips or artifacts. (I just tried with these two or so files - i.m.o. NOT worth the time to do these test manually, for ALL the PCM chunks).
PLUS there is more:
VAB data is present, for the effects & music instruments, but (on closer inspection) there are no SEQ (due to the nature of game - you try to "create" the SEQs "live"), and the HEADER (0x1000 bytes) for PCM (??) from VB are in the end of VB data, NOT at the start.
[VB.001][VH.001][VB.002][VH.002][VB.003][VH.003][VB.004][VH.004][VB.005][VH.005]... [VB.0FN][VH.0FN] (curiously, following this last VH header is the PCM-data for the music found above)
Just search [FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF] to get a guess as to what offset has the starting VB data. For the US version that I explored, this data is found at 0x02D78000 (as always, a multiple of 0x800)
I did not find any information on this VAB format, like frequency offset, channels, nº instruments, ... I hope someone can help me make a GENH file taking a VAB data as source. (There are like 110 VABs inside PS2.DAT. MUCH less than PCM chunks, but I need the knowledge on the format, if anybody has o can help I would be very grateful !!)
I hope this information be enough for someone to build a music set of this great music game & upload in collections due. Particularly the instrument samples in these VABs will be useful for many of the users here.
I tried with .GENH headers, but I only listen a millisecond of sound. I know these could be samples because of them being "VAB", as in the SEQ/VAB format from psx, nut as there are NO .SEQ data in the file, I cannot do nothing to make some sort of psf. (Yes!, these could make PSF files from a PS2 game)
Is the thread's title misleading ?? Assuming VAB contains PCM, then I need the info to extract how many sounds each VAB has, and append each one a GENH header. Where do I get info on # tracks, frequencies, channels, even if it's PCM in the first place ??
Sorry for late response. Here is a part of the PS2.DAT file indicating offsets. Should contain 18 .VABs Please notice that headers (pBAV..) comes AFTER .VB content.
edited 1:27 PM EST January 27, 2018 Reason: wrong offsets