Building GH2 Audio with RockAudio | mariteaux |
|
Here at homeOther projectsOther SomnoliansLast modified: 11/19/2021 |
The traditional way you build audio for customs in GH2 is using a program called Guitar Hero Explorer, or GHEx. GHEx is so terrible that I don't include it in my big batch of tools, and any mention of it in MiloHax means I throw things at people. If you'll indulge me so I never have to go on this rant again, here's why you shouldn't use GHEx at this point:
The sample rate of digital audio means how many "samples" of a waveform per second exist in the file. You can open an audio file in Audacity, zoom in real close, and see a bunch of dots making up curves. Those are your samples. Put those samples in order, you have audio. More samples, more high-frequency content, basically. We use mostly 44.1KHz in the consumer world (so 44,100 little samples every second), but GH2 has a variety of sample rates for its various VGS files, and GHEx will resample the audio if the audio you're importing in is at a different sample rate. Very, very poorly. Here's an uncompressed example of its handiwork if you hate your ears. Hear that high-pitched whispering? That's called aliasing and it's nasty. Here's what it looks like in the spectrograph: Oh no! So what else can I use?Thankfully, you have an alternative, one that will just build whatever you pass to it into a VGS, no questions asked. It's fucking ace. It's called RockAudio. Grab it in my batch of tools as always, in the RockLib folder. It's a command-line app, so if you don't know how to use one of those, read my dtab tutorial first. If you double-click it and then tell us nothing happened, you've failed the first test. You'll also want to grab Audacity if you don't already have it. Audacity is a free DAW that'll do everything you need to do here, and this tutorial is written for it. If you have another DAW you prefer with multi-channel export, you can use that instead. Here's what you'll see when you run RockAudio without any arguments:
We're interested in that A note on channel mappingsGH2's VGS files can have anywhere from 2-6 channels of audio. You'll need to have the exact same number of channels in your new VGS as in the original one, or else you'll crash the game. Depending on the context, the game will either be left with additional channels it can't map or it'll try to map channels that don't exist. You don't want that. Here's the general channel mappings you'll encounter:
Sample rates aren't listed because, as you're building a new VGS and not just using an existing one like with GHEx, they don't matter. You can use 44.1KHz or any other sample rate you choose and RockAudio will build it and GH2 will play it. (Lower sample rates mean smaller files, of course. I tend to go with 32KHz for everything, which is about FM radio quality. Plenty for GH2.) Some occasional songs that don't fit the above pop up (some songs like "Collide" have stereo bass, and "Soy Bomb" in co-op only has four channels, with a mono lead and a mono rhythm), so if you really wanna make sure, extract the original VGS and use VGS Splitter or RockAudio itself to tell you the number of channels and then match that. Now, if you're a bit more advanced and you know how to write your own Preparing your audioYour goal when building a VGS file is to generate a WAV with the right number of channels. Audacity will let you export a WAV with as many channels of audio as you'd like, provided you're using the Advanced Mixing Options dialog. To enable that, go into Edit > Preferences, and make sure that, under "Import / Export", the "Use custom mix" radio button is selected. Now to lay out your audio how you like it. If you have split audio, mix it down to your 5-6 channels as needed, just making sure all the sample rates match. RockAudio will choke if they don't. If you don't have split audio, simply import in your audio and then go to Generate > Silence, making sure it's the same length as the song itself. You only need one channel of silence, and that's a trick I'll show you in a moment. You're ready to export. Go to File > Export > Export as WAV and save your file somewhere. After you do, the Advanced Mixing Options dialog will show up, enabling you to create a five-channel WAV. To explain quickly, the blue boxes on the left are your input channels, as seen in your project, and the grey boxes are the output channels in the WAV. You can drag the slider to set the required number of channels. Clicking on a blue and then grey box will either link or unlink it, meaning that channel's audio gets mapped to that channel in the output WAV. For my project, you can see that I'm already golden. Stereo tracks have two channels, and therefore we have stereo band, stereo guitar, mono bass. However, if you're making a normal custom without split audio, you'll need to map your silent track onto the 2-4 playable tracks, with your mixed audio mapping to the two band tracks. That should look like this: Converting WAV to VGSOnce you've got your audio mixed down, it's time to convert it with RockAudio. Open your Command Prompt, drag in the RockAudio executable, and append
Now you have to append your input and output files. RockAudio will know what you mean based on the extensions. Drag your WAV file into the Command Prompt window, press Space, and do it again, this time replacing the
Hit Enter. Wait a few moments as RockAudio converts your VGS:
And that's it. As a weird side effect, VGS Splitter doesn't seem to like RockAudio-encoded VGS files, but GH2 will play them just fine. Substitute the VGS using ArkTool or ARK Expander, and you've successfully replaced your audio the correct, not-dreadful way. |