theleftexit.net

Home About
Theme

Paths Revisited

Backstory

Raise your hand if you think the Sonic Frontiers Cyberspace OST slaps. Raise your second hand if you think this goes double for The Final Horizon DLC stages.

In case both of your hands aren't up yet, here's a taste:

Back when the game first came out, I would follow some Steam Community guide to extract the initial set of tracks by converting them between a few various formats, then download them on my phone. Sure, they're all up on YouTube anyway, but YouTube means bad audio quality and no shuffling/playlisting - not unless you go out of your way to create your own playlist, which I couldn't be arsed to.

I played the DLC when it came out, but the new Cyberspace stages were a) obnoxiously difficult, and b) not at all required for storyline progression. I visited them a few times, enjoyed the remixed music, but didn't stay for it. I wouldn't give these tracks a second thought until I came across the new OST on YouTube yesterday.

foobar2000

If you have Sonic Frontiers installed through Steam, you'll find encoded Cyberspace background music at C:\Program Files (x86)\Steam\steamapps\common\SonicFrontiers\image\x64\raw\sound\cyber_sound. Look for the only two files that take up more than 5 MB.

.awb is a sort of a music container - it can store one or more "subsongs". The easiest way I could find to interact with these files is by loading them up in foobar2000 with the vgmstream component.

  1. Download foobar2000. WinGet users can install PeterPawlowski.foobar2000 instead.
  2. Download the vgmstream foobar2000 component.
  3. Open foobar2000, navigate to Library => Configure => Components => Install. Select the newly downloaded .fb2k-component file, then click OK to restart foobar2000.
  4. File => Open.

You'll notice that each track is followed by its "boosted" version, which plays whenever you boost on a stage. This mechanic was so obnoxious that later updates added the ability to disable it. There are also a few "stage clear" jingles, which you probably also don't care for.

You'll also notice that tracks are pretty much completely out-of-order. If you want to label them by yourself, you'll have to load up the album on Spotify and match/rename them, one track at a time.

Lastly, foobar2000 won't let you see or use the tracks' loop points - this feature is only available in the vgmstream CLI. Let's talk a bit about that.

vgmstream

The YouTube tracks I came across include 2 loops of the main track, then a short fade-out. If you export the tracks from foobar2000, you'll get the same result. This would leave you to believe that this is the exact way in which the tracks are stored, and the game has some fancy logic to loop them at hardcoded timestamps. Nope.

If you run vgmstream-cli.exe from the command line, you'll get a list of options. Here are a few of them:

-i: ignore looping information and play the whole stream once
-l N.n: loop count, default 2.0
-f N.n: fade time in seconds after N loops, default 10.0
-d N.n: fade delay in seconds, default 0.0
-F: don't fade after N loops and play the rest of the stream
-e: set end-to-end looping (if file has no loop points)
-E: force end-to-end looping even if file has real loop points

Long story short - the loop timestamps are stored in the .awb file itself, and the reason you always hear tracks with two loops and a fade-out is because vgmstream said so. You could quite easily bop out a 10-hour version with a single command, or render exactly as much as there is in the game's audio file. However, to me, the default values are perfectly fine.

Automation

Sure, you could use any of the tools I mentioned to export and rename all 39 tracks and call it a day. But you know what's even more fun? Making the process automated and reusable.

I present to you - CyberMiner. This tool:

Well, fun for me. It takes out all fun out of the process for you - all you have left to do is download and run an .exe. But it fast-tracks you to the other fun bit - listening to all these tracks in a music player of your choice.

Considerations

Here's a thing - those same tracks are also available on major music platforms like Spotify. Alternatively, if you want an option that's both "legal" and lossless, you can import the Stillness & Motion CD and rip the tracks from there.

Well, I did. The tracks on the CD are practically equivalent to those on Spotify, including my least favorite feature - they're much shorter, and they end with abrupt half-second outros instead of fade-outs. It makes sense, but when you're shuffling through these tracks on the go, it's very distracting.

There's an open question which tracks are of higher quality - those ripped from the game, or those on CDs. GPT-4 says that in-game OST might be compressed, while CD tracks may have additional mastering done to them. If true, it means that a compromise must be made between the quality of the audio and quality of the mix. I pick a better mix.

If you prefer quality - the Paths Revisited CD is set to release on November 15th.

Unrelated

Today marks the day when I swallow my pride and add JavaScript to theleftexit.net - an otherwise minimal static website. You can now toggle between dark and light themes! All relevant code courtesy of GPT-4 - I'll stick to C#, thank you very much.