Re:Variable duty cycle square waves with the Web Audio API
by magicalhippo on Monday April 07, 2025 @07:09PM
(#43616897)
Sure, but having a channel with 25% duty cycle of frequency f and a channel with 75% duty cycle of frequency 3f will lead to a different waveform after mixing compared to 75% at f and 25% at 3f, no?
Depending on how that's processed downstream it could sound very different I imagine.
In crude ASCII art (two inputs mixed to an output):
---_________
---_---_---_
¨¨¨_---_---_
vs --------____
-___-___-___
¨---¨----___
Re:Variable duty cycle square waves with the Web Audio API
by recursive on Monday April 07, 2025 @07:20PM
(#43616939)
I saw a video a few years that provided pretty convincing experimental evidence that's not actually the case.
Re:Variable duty cycle square waves with the Web Audio API
by magicalhippo on Monday April 07, 2025 @10:06PM
(#43617704)
Very interesting, though any non-linear effects would definitely get affected.
Not sure how much that comes into play on the Gameboy though.
Re:Variable duty cycle square waves with the Web Audio API
by charcircuit on Monday April 07, 2025 @09:29PM
(#43617545)
If you play 2 inverse waves it will sound different than 2 of the same wave.
[1]: https://gbdev.gg8.se/wiki/articles/Gameboy_sound_hardware#Sq...