Re:Variable duty cycle square waves with the Web Audio API
by iamdan on Monday April 07, 2025 @08:34PM
(#43617287)
This is correct, the demo not properly handling the selection of a new duty cycle. I pushed up a correction just now. Thanks for laying out a detailed replication - made for an easy fix
Confirmed. Author, please fix! For example, in the first set of radio buttons:
1. Leave it at the 50% default
2. Press play
3. Change it to the 12.5% option -- we continue to hear the same sound
4. Change it back to 50% -- finally we hear a different sound
This is broken. Another example:
1. Listen to 12.5% after having come directly from 25%
2. Listen to 12.5% after having come directly from 50%
The 12.5% should sound identical in either case, but it erroneously does not.