The Forum is up for sale: XeNTaX Forum looking for new owner

Voxware Headerless Interleave

Get help on any and all audio formats, or chip in and help others!
Post Reply
vgripHE303
veteran
Posts: 111
Joined: Mon Aug 11, 2014 12:41 pm

Voxware Headerless Interleave

Post by vgripHE303 »

Hello, is it possible to know a way to correctly convert the .RAW music files from Monsters vs. Aliens PC? The codec is IMA but doesn't seem to play correctly when I create a GENH header and play with vgmstream.
Last edited by vgripHE303 on Tue Feb 19, 2019 9:47 pm, edited 3 times in total.
hcs
mega-veteran
mega-veteran
Posts: 263
Joined: Sun Oct 18, 2009 9:41 pm
Location: Portland, OR
Has thanked: 3 times
Been thanked: 79 times
Contact:

Re: Voxware Headerless Interleave

Post by hcs »

It is interleaved at the nibble level, which isn't supported by GENH. Use denibble to split it into channels:

Code: Select all

denibble input outL outR
I guessed this due to the file having an odd number of bytes. (Note it's possible that I have the channels reversed)

You can combine them, or you can just make a GENH for each channel, vgmstream will support playing both if they are named like outL.genh and outR.genh due to the dual-file stereo feature.

Edit:
fwiw it is IMA, you can just decode it with

Code: Select all

sox --combine merge -t ima -r 44100 outL -t ima -r 44100 outR -e signed-integer -b 16 out.wav
vgripHE303
veteran
Posts: 111
Joined: Mon Aug 11, 2014 12:41 pm

Re: Voxware Headerless Interleave

Post by vgripHE303 »

It works like a charm. Thank you.
Last edited by vgripHE303 on Tue Feb 19, 2019 9:49 pm, edited 2 times in total.
vgripHE303
veteran
Posts: 111
Joined: Mon Aug 11, 2014 12:41 pm

Re: Voxware Headerless Interleave

Post by vgripHE303 »

Is there a command line to make denibble creates folders for each outL and outR by each filename? Thank you.
Last edited by vgripHE303 on Tue Feb 19, 2019 9:48 pm, edited 2 times in total.
hcs
mega-veteran
mega-veteran
Posts: 263
Joined: Sun Oct 18, 2009 9:41 pm
Location: Portland, OR
Has thanked: 3 times
Been thanked: 79 times
Contact:

Re: Voxware Headerless Interleave

Post by hcs »

Try

Code: Select all

FOR %A IN (*.sfc_vxt) DO denibble %A %A_L %A_R
I think that should give you 469_44100_4_001.sfc_vxt_L, 469_44100_4_001.sfc_vxt_R, etc
vgripHE303
veteran
Posts: 111
Joined: Mon Aug 11, 2014 12:41 pm

Re: Voxware Headerless Interleave

Post by vgripHE303 »

Yes, it works perfectly. Now I don't think if it's possible, but is there a way to reassemble L and R for each file with a sox command please? Thank you.
Last edited by vgripHE303 on Tue Feb 19, 2019 9:50 pm, edited 1 time in total.
hcs
mega-veteran
mega-veteran
Posts: 263
Joined: Sun Oct 18, 2009 9:41 pm
Location: Portland, OR
Has thanked: 3 times
Been thanked: 79 times
Contact:

Re: Voxware Headerless Interleave

Post by hcs »

Think about how you would run it one at a time, and how you might edit the command to move from one file to another; this will lead you to create an equivalent FOR loop.

I think this will work but I haven't tested it (nor did I test the denibble step I showed earlier):

Code: Select all

FOR %A IN (*.sfc_vxt) DO sox --combine merge -t ima -r 44100 %A_L -t ima -r 44100 %A_R -e signed-integer -b 16 %A.wav
vgripHE303
veteran
Posts: 111
Joined: Mon Aug 11, 2014 12:41 pm

Re: Voxware Headerless Interleave

Post by vgripHE303 »

Curiously, I tried to copy and paste this into a notepad, save as .BAT and launch, but it won't work.
Last edited by vgripHE303 on Tue Feb 19, 2019 9:51 pm, edited 2 times in total.
vgripHE303
veteran
Posts: 111
Joined: Mon Aug 11, 2014 12:41 pm

Re: Voxware Headerless Interleave

Post by vgripHE303 »

My bad, just noticed I had to use %%a instead of %a when using batch method.
Last edited by vgripHE303 on Tue Feb 19, 2019 9:51 pm, edited 2 times in total.
hcs
mega-veteran
mega-veteran
Posts: 263
Joined: Sun Oct 18, 2009 9:41 pm
Location: Portland, OR
Has thanked: 3 times
Been thanked: 79 times
Contact:

Re: Voxware Headerless Interleave

Post by hcs »

Yeah, with a .bat file you need to use %%A instead of %A for the substitutions.

Code: Select all

FOR %%A IN (*.sfc_vxt) DO sox --combine merge -t ima -r 44100 %%A_L -t ima -r 44100 %%A_R -e signed-integer -b 16 %%A.wav
Last edited by hcs on Wed Aug 03, 2016 5:43 pm, edited 1 time in total.
vgripHE303
veteran
Posts: 111
Joined: Mon Aug 11, 2014 12:41 pm

Re: Voxware Headerless Interleave

Post by vgripHE303 »

Still having an error though, don't know why.
Last edited by vgripHE303 on Tue Feb 19, 2019 9:52 pm, edited 2 times in total.
hcs
mega-veteran
mega-veteran
Posts: 263
Joined: Sun Oct 18, 2009 9:41 pm
Location: Portland, OR
Has thanked: 3 times
Been thanked: 79 times
Contact:

Re: Voxware Headerless Interleave

Post by hcs »

Actually every % needs to be %%, I corrected the last post.
vgripHE303
veteran
Posts: 111
Joined: Mon Aug 11, 2014 12:41 pm

Re: Voxware Headerless Interleave

Post by vgripHE303 »

Thank you so much!
Post Reply