News for hackers. Stuff that matters.
Re:Variable duty cycle square waves with the Web Audio API by Blackthorn on Monday April 07, 2025 @01:17PM (#43613750)
That waveshaper version is going to alias pretty badly, isn't it? Did the original Gameboy sounds have that aliasing?
Re:Variable duty cycle square waves with the Web Audio API by iamdan on Monday April 07, 2025 @04:25PM (#43615582)
it does, you definitely "feel" the change. I actually have to do some digging to figure that out, I unfortunately do not have my childhood GBA anymore so I have to rely on audio clips to make that call
Re:Variable duty cycle square waves with the Web Audio API by Blackthorn on Monday April 07, 2025 @04:56PM (#43615852)
Don't forget to factor in the Gameboy speaker in your listening of those audio clips. That's a major factor that will change how these waveforms sound very significantly. Those clips, and the classic sounds of chiptunes, are never "just" the sound coming off the DAC.
Re:Variable duty cycle square waves with the Web Audio API by dimatura on Monday April 07, 2025 @04:53PM (#43615822)
I'm not an expert on GB chiptune, but from what I've heard from enthusiasts is that different GB models sound different, and even within the same model there are variations. That said, it wouldn't surprise me if the GB waveforms aliasing, at least from the digital side, given that it was operating with pretty minimal synthesis capabilities. There's probably some extra low- and high-pass filtering that shape the sound after the waveform itself is generated. Looking at some examples of actual GB PWM waveforms, for sure some high-pass would make a pure PWM waveform more GB-like. And some low-pass could help a bit with aliasing.