Game Boy Advance Audio Interpolation

jsgroth.dev

54 points by ibobev 5 hours ago


QuadmasterXLII - 6 minutes ago

I suspect that without nostalgia, the fixed interpolation would absolutely sound better. Unfortunately, nostalgia. The lesson I'm taking away here is that, oh, the terrible resamplings are the aspect of faithful emulation that makes it sound like a GameBoy and not just sawtooths.

dleslie - 4 hours ago

The originals sound better. The aliasing provides a crunchiness and sharpness to the final output that drives emotional energy. That zero mission rhythm isn't intended to sound smooth and soft, the driving hard beats are an emotional tool for eliciting anxiety and anticipation from the player.

But this is a bit like those who use smoothing filters. It's ultimately about taste, but it should be recognized that unless the filter is attempting to accurately recreate the original hardware of the era then the original design intent is not being adhered to, and so something may be lost in the "enhancement".

dietrichepp - 4 hours ago

This is great stuff… basically, an easy way to get much higher quality audio out of a GBA emulator.

I’ll add some context here—why don’t more games run their audio at 32768 Hz, if that’s such a natural rate to run audio? The answer lies in how you fill the buffers. In any modern, sensible audio system, you can check how much space is available in the audio buffer and simply fill it. The GBA lacks a mechanism to query this. Instead, what you do is calculate this yourself, and figure out when to trigger additional audio DMA from the VBlank interrupt. You know the VBlank runs every 280896 cycles, and you know that the processor runs at 16777216 Hz, so you can do some math to calculate how much data is remaining in the audio DMA stream.

A lot of games simplify the math—it’s easier to start a new audio DMA in your VBlank handler, but that means running at a lower sample rate, which will sound pretty crispy.

YMMV, some people like the crispy aliased audio. If the audio weren’t crispy, the sound designers probably would have adjusted the samples to compensate. Other factors being equal, I’d rather listen to what the original artists heard when they were testing on real hardware, because that is probably closer to what they intended, even though it has a lot of artifacts in it.

bitcraft - 3 hours ago

The crispy aliasing of the audio has always felt cozy to me. It’s also a bit of a signature of the system, like the wobbly polygons on PS1. I appreciate that there are ways to change the sound, but it feels a bit rude to label it broken or defective.

joefourier - 4 hours ago

The reason the nearest neighbour interpolation can sound better is that the aliasing fills the higher frequencies of the audio with a mirror image of the lower frequencies. While humans are less sensitive to higher frequencies, you still expect them to be there, so some people prefer the "fake" detail from aliasing to them just been outright missing in a more accurate sample interpolation.

It's basically doing an accidental and low-quality form of spectral band replication: https://en.wikipedia.org/wiki/Spectral_band_replication which is used in modern codecs.

MBCook - an hour ago

Impressive.

Audio was the thing I could never figure out on my Gameboy emulator. I couldn’t get it to pass basic tests, even without bothering to output sound on the computer.

soulofmischief - 9 minutes ago

The loss in high-frequency information is not worth the interpolation. Bass loses its crunch. Percussion fades into the background.

Besides, I personally prefer to play my vgm at the original sample rate, and my soundcard adjusts to the correct rate for each song through fb2k plugins.

functionmouse - 39 minutes ago

The original sounds so much better...

Distilitron - 2 hours ago

[dead]