< Back to the tutorial index

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.

GHEx taking a shit and dying
Awful, awful program.

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:

  • GHEx is likely to fuck up your ARK. GHEx has what we in the trade call memory leaks, which means it doesn't quite give up all the memory it takes for itself on your computer when it does things. Memory leaks generally mean crashytime, and crashes mean your ARK gets corrupted.
  • GHEx is hypersensitive and will error on things the game won't. Recently, we had someone (in 2020!) come into MiloHax and ask about the infamous shakin.mid error. The GH:80s MID for "Shakin'" contains an extra benign text event in the TRIGGERS track that the game doesn't even flinch on, but GHEx will shit itself on. No other ARK editing tool, not ARK Expander, not ArkTool, nothing but GHEx has this problem.
  • GHEx is ridiculously user-unfriendly and a lot of it doesn't even work anymore. It has to verify ARKs every single time you import them in. Make a change to an ARK? It has to "move files around", taking a bunch of time. It will throw an error on trying to play VGS files, despite having that take up space in the GUI.
  • And most relevantly to us today, GHEx will very badly resample your VGS audio.

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.

The samples of a waveform, as seen in Audacity
The samples of a waveform, as seen in Audacity. Those little dots are what you hear every day on your computer! (Click to zoom in)

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:

Absurd, extreme aliasing in GHEx's resampling output
The bottom track is the control (no pun intended), and the top track is how GHEx resampled it. You can pretty clearly see the whispering I refer to around the 17KHz mark.

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:

Usage:
RockAudio.exe convert [-usebass] [-channels=<input channel #s>] [-channelsamples=<sample rates>] <input audio file> <output file>
        Converts an audio file.  Channels will be converted as-is unless channel information is specified.  Channel information is comma separated.
RockAudio.exe play [-usebass] <file>
        Plays the audio file.
RockAudio.exe stats [-usebass] <file>
        Gives channel stats.

Supported formats: wav, mp3, vgs, ogg
-usebass: If specified, the BASS libraries from un4seen.org are used.  If unspecified, native code or the Yeti libraries are used.  Using BASS libraries involves additional license restrictions, and is not open sourced code.

We're interested in that convert option, mostly.

A note on channel mappings

GH2'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:

  • Sound effects and menu music: Two channels, stereo.
  • MOST songs: Five channels, channels 0-1 for stereo band, channels 2-3 for stereo guitar, channel 4 for mono bass.
  • Singleplayer VGS for lead/rhythm songs: Four channels, channels 0-1 for stereo band, channels 2-3 for stereo guitar.
  • Multiplayer VGS for lead/rhythm songs: Six channels, channels 0-1 for stereo band, channels 2-3 for stereo lead, channels 4-5 for stereo rhythm.

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 songs.dtb definitions, you can remap channels however you'd like, and then obviously, it doesn't matter how the mappings originally were. For example, I only generate five-channel VGS files because my songs.dtb entries always match that. This is out of the scope of this tutorial, but I'd highly recommend learning to do so for serious customs work.

Preparing your audio

Your 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.

Enabling the Advanced Mixing Options dialog in Audacity preferences
Enabling the Advanced Mixing Options dialog in Audacity preferences

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.

Stems in Audacity laid out as needed
Stereo band, stereo guitar, mono bass. Perfect.

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.

The Advanced Mixing Options dialog, mixing five channels of stems to a five-channel WAV
The Advanced Mixing Options dialog, mixing five channels of stems to 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:

The Advanced Mixing Options dialog, mixing silence to three of the five channels
This is why I told you to only generate the one silent track, as it can stand in for three silent channels in the output WAV.

Converting WAV to VGS

Once 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 convert to the command:

C:\Users\mariteaux>RockAudio.exe convert

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 .wav extension with .vgs.

C:\Users\mariteaux>RockAudio.exe convert upupupupup.wav upupupupup.vgs

Hit Enter. Wait a few moments as RockAudio converts your VGS:

Channel #0: Sample rate 44100 from source channel #0, sample rate 44100
Channel #1: Sample rate 44100 from source channel #1, sample rate 44100
Channel #2: Sample rate 44100 from source channel #2, sample rate 44100
Channel #3: Sample rate 44100 from source channel #3, sample rate 44100
Channel #4: Sample rate 44100 from source channel #4, sample rate 44100
Writing VGS
Writing VGS: 0% (5s, 10m 54s remaining)
Writing VGS: 1% (10s, 10m 41s remaining)
Writing VGS: 2% (15s, 10m 32s remaining)
Writing VGS: 3% (20s, 10m 18s remaining)
Done.

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.

< Back to the tutorial index

Advertisement