Game Boy Advance Audio Interpolation

58 points - today at 5:44 PM

Source

Comments

dleslie today at 6:39 PM
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 today at 6:42 PM
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.

aappleby today at 10:44 PM
I don't quite understand why the author is doing special handling for PSG versus PCM audio.

My GameBoy emulator generates one "audio sample" per clock tick (which is ~1 mhz, so massive 'oversampling'), decimates that signal down to like 100 ksample/sec, then uses a low-pass biquad filter or two to go down to 16 bit / 48 khz and remove beyond-Nyquist frequencies. Doesn't have any of the "muffling" properties this guy is seeing, aside from those literally caused by the low-pass.

QuadmasterXLII today at 10:34 PM
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.
bitcraft today at 7:48 PM
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 today at 7:02 PM
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 today at 9:41 PM
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.

functionmouse today at 10:01 PM
The original sounds so much better...
soulofmischief today at 10:31 PM
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.

Distilitron today at 8:45 PM
[dead]