Rip and (re)mix your own Hyrule Warriors soundtrack!

Discussion in 'Wii U - Tutorials' started by QuarkTheAwesome, Jul 3, 2016.

  1. QuarkTheAwesome

    QuarkTheAwesome Working for Hugs

    Apr 19, 2015
    Stuck in the PowerPC
    Hey all!
    Just did this myself and wanted to share it with you all. Basically, you can rip and (re)mix your own Hyrule Warriors soundtrack with a few simple tools. Each song is split into separate tracks and each track has several alternative tracks, so you can mix your own combinations of each. Heck, you could even use tracks from other songs if you wanted.
    Audiophiles will like this too since each output file is 48KHz PCM which is far better than the gamepad-recorded stuff you find on YouTube. You also get all the benefits of mixing a song yourself (levels, EQ, remove tracks etc.)

    Anyway, let's get into it!

    Step 1 - Dump
    First you'll need to use your favorite Wii U backup tool to dump the game files. I personally like ddd, haven't tried any other tools or backup sources but any Loadiine-ready backup should work. Your output files should contain a bgm folder full of ".g1l" files (mine was under /content) for this to work. My dump had 154 .g1l files numbered 0 to 319.

    Step 2 - Download tools
    Next you'll need a few tools to extract and manipulate the sounds. I've placed links and whatnot below.
    • vgmstream's "test" application - Source (I was able to find a Win32 pre-built version here)
    • Some kind of DAW or audio editor - I used Audacity for this task, but anything should work
    • A music player - Again, anything should work. I used VLC because it's quick.
    Step 3 - vgmstream
    Next up is the longest part of this process. It involves extracting each individual track from each file. This is actually a very simple process, it's just a bit tedious. It's better if you have a few specific songs in mind.
    (The following bit is different for OSX/Linux users. The command syntax is the same though.)
    First, open up a command prompt with access to the vgmstream "test" program (easy Windows method: Extract any zips, go into the folder, shift-right click on some empty space and hit "Open command window here") and quickly check it's working by typing "test" and pressing enter - you should get a bunch of usage with "vgmstream test decoder" at the top. From here, you simply need to run this command:
    test -o <output.wav> -2 <track number> <path to .g1l file>
    To get started, run something like the following:
    test -o bgm0-0.wav -2 0 <whatever>\bgm000.g1l
    Make sure to swap <whatever> with the appropriate path. If all runs well, you will see a bunch of information and after a while the program will exit and you'll be back at the command prompt (You'll also have the orchestral track of the opening theme saved as bgm0-0.wav). The important information here is "channels" - this will allude to how many tracks are in the file and therefore how many times you need to run vgmstream. In this example, there's 10 channels. Since each track is in stereo, divide by two to get 5 tracks, and lastly subtract 1 (since <track number> is 0-based) to get 4 (maximum track number). This means that to extract all the tracks from bgm000.g1l, you need to run the following:
    test -o bgm0-0.wav -2 0 <whatever>\bgm000.g1l
    test -o bgm0-1.wav -2 1 <whatever>\bgm000.g1l
    test -o bgm0-2.wav -2 2 <whatever>\bgm000.g1l
    test -o bgm0-3.wav -2 3 <whatever>\bgm000.g1l
    test -o bgm0-4.wav -2 4 <whatever>\bgm000.g1l
    You can see the pattern. You'll end up with 6 tracks - the orchestral opening (bgm0-0.wav) and alternate version (bgm0-1.wav), drums and guitar (bgm0-2.wav), woodwind melody (bgm0-3.wav) and guitar accent (bgm0-4.wav, starts at about 0:22). Listen to them all in your media player if you like.
    Repeat the pattern for each g1l file you'd like to extract. It's worth noting that some files only have 1 track (2 channels / 2 = 1 track - 1 = 0) so only extract track 0 for those! Other than that it's up to you how you choose and label each track.
    If you've tried to extract a track that doesn't exist I find that it will appear to work, but the output file will be one of the other tracks with some clicking and popping in it. Not ideal. You can always check in a media player if you aren't sure whether a track worked or not.

    Step 4 - Mixing
    Now you've extracted some tracks, it's time to mix them together in a way you like! If you've been listening to them as you go, you probably have already started labeling them in your mind - drums, alternate drums, lead, etc...
    In most cases you can simply drop a few tracks into your DAW and have them work without modification. Simply pick some you think will sound good together and give them a go! Depending on your DAW, you can also play with volume levels, EQs and whatnot.
    Going with the example above (opening song) I personally like just throwing all the tracks in at once, although muting everything but the guitars and the woodwinds is kinda interesting. It's up to you what you do with your tracks. Make something interesting!

    Step 5 - Enjoy!
    Not much after this point - just export it from your DAW and if it's cool, share it here!
  2. I pwned U!

    I pwned U! GBAtemp Advanced Fan

    GBAtemp Patron
    I pwned U! is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jun 14, 2013
    United States
    Does the vgmstream test app also support injecting custom tracks into the GIL files? It would also be nice to use it for creating custom BGM.
    The Cringe likes this.
  3. QuarkTheAwesome

    QuarkTheAwesome Working for Hugs

    Apr 19, 2015
    Stuck in the PowerPC
    By the looks of things, vgmstream is just a decoder and not an encoder. However, someone could theoretically use the information present in vgmstream to write another program to encode g1l files, apparently it's just PCM that's been screwed with. Not the sort of project I'd want to take on right now though.
    I pwned U! likes this.
  4. skilarbabcock

    skilarbabcock Member

    Dec 29, 2014
    United States
    Grand Junction, Colorado
    Is there anything for replacing models?
  5. EarlAB

    EarlAB hon hon titty croissants

    Jul 25, 2012
    United States
    Please make a tutorial on how to inject the 3DS-exclusive features. lol

    But seriously, if somebody CAN do that, I would be so happy!