Editing .RWAV files by Dude at 7:40 PM EDT on July 22, 2012
Lmao it's been 2 years since I last logged in.
Anyway, I've been trying to import a piano arrangement I made from Rhythm Heaven Fever's Remix 10 into the actual game. So far I've gotten this far: Blah
However, it's slowed down and the left and right channels are different because it probably needs to be mono or something. I don't get it but oh well.
I've used sndconv.exe to convert the original wav to spd (Rate:44100 Output:ADPCM) and just copy and pasted it into remix10.rwav while editing the header to the correct size and everything.
But it still sounds weird. Any clues? Am I even using the right program? If not, what should I be using?
EDIT 1: man....it looks right but why isn't it working....unless...
EDIT 2: Ok, I finally got it....
EDIT 3: Ok, before anything, you gotta change the sampling frequency at 0x2C (16-bit) from 32000 to 44100. The way it works is that it's like a half-file interleave. Which means you need 2 mono DSP streams that you will need to merge together end-to-end. You're also gonna need to change the value at 0x34 which contains the number of DSP nibbles for the required conversion to samples. I honestly don't know how to do this unless you understand the following code:
/* * The original DSP spec uses nibble counts for loop points, and some * variants don't have a proper sample count, so we (who are interested * in sample counts) need to do this conversion occasionally. */ int32_t dsp_nibbles_to_samples(int32_t nibbles) { int32_t whole_frames = nibbles/16; int32_t remainder = nibbles%16;
#if 0 if (remainder > 0 && remainder < 14) return whole_frames*14 + remainder; else if (remainder >= 14) fprintf(stderr,"***** last frame %d leftover nibbles makes no sense\n",remainder); #endif if (remainder>0) return whole_frames*14+remainder-2; else return whole_frames*14; }
Moving on....0x104 needs to be changed to the stream size (minus the header, just like RIFF). 0x50 is very important because it's what's used to determine a sort-of half-file interleave to a value which is half the stream size that was inputed to 0x104. I may be missing some other places but let's just try that for now. Remember, these are all big-endian values. Also you need to copy over the coefs.
Secondly, I decided to stick with 32000 as the rate instead of 44100 because the original rwav was 32000.
Lastly, it seems to have quite a bit of noise in the background, and I'm thinking it had to do with the conversion from wav to spd, however I have no way of confirming that. Got any more ideas?