SameBoy
SameBoy copied to clipboard
Attenuated treble on DMG
When comparing an ad hoc white noise signal played back through wave channel, I found SameBoy 0.13.6 remarkably close to a real DMG A/B/C. While the digital signal generation seems impeccable, I found a difference in high-end of the spectrum, giving real hardware an edge due to a sharper, crisper and ultimately more satisfying sound. The difference is confirmed by spectral analysis, which shows that Sameboy audio above 8 kHz is attenuated by a few dB.
Test files: noise.zip
Spectrogram
The image shows two superimposed signals. Red = DMG, purple = SameBoy 0.13.6. It can be seen that DMG signal is 1-2 dB louder above 8 kHz.
![overlay](https://user-images.githubusercontent.com/3259963/109339627-2fdee200-7868-11eb-940b-3ecfcd670e51.png)
After inspecting the code, it feels plausible that this error is introduced when downsampling APU output to 48 kHz.
As a sanity check, I made the same comparison with Gambatte (configured to use Highest Quality FIR downsampler). Here, there is no serious roll-off until 17 kHz. I think the difference is audible and Gambatte certainly sounds closer to the real thing.
![gambatteoverlay](https://user-images.githubusercontent.com/3259963/109638395-4332cb80-7b4e-11eb-89a9-a00d6b4a95fb.png)
Could also be different high-pass-filter constants as well as the lack of a low pass filter in SameBoy.
Maybe Blip Buffer could be incorporated for the resampling?
IMO this would be the last hurdle for 100% audio emulation.
I investigated further. In the samples attached in this message, it looks like most of the difference is from wave refresh audio spikes being more pronounced on real DMG. So in this particular case, Sameboy is "too good" :) which is maybe not a disaster.
As a summary, my analysis now is that the DC blocker emulation is a bit off. Sometimes it sounds better, sometimes it sounds worse.
You can choose for yourself, if it is something worth fixing :-)
Definitely, the 808.zip comparison is clearly audible. How other emulators behave with this test?
Gambatte is very close to Sameboy. BGB is different, also not so much like real hardware.
On Tue, 20 Apr 2021 at 09:17, Leopoldo Pla @.***> wrote:
Definitely, the 808.zip comparison is clearly audible. How other emulators behave with this test?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LIJI32/SameBoy/issues/348#issuecomment-823038673, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAY34OYGBLI33PYTHLTWLZLTJUTA7ANCNFSM4YG5WMMQ .