Ahh, but the frequency of the level switching has to high (fast) enough so that a human ear only hears the average. Otherwise it sounds horrible.DouglasReynholm wrote: ↑Thu Aug 27, 2020 1:21 pm @TMD2003
Having seen what the SID effects look like on an oscilloscope I now know that this is created by a square wave that's "more up than down" or "more down than up"
The technical term for this is PWM, or Pulse Width Modulation, a common technique used on most synthesizers, alongside triangle, ramp (sawtooth), and plain 50/50 duty cycle square waves. Pure sine waves are generally less common as an audio oscillator, as they have no harmonics, but are used to modulate other aspects of a sound, for example PWM!
On sound chips like the General Instrument AY-3-8910, AY-3-8912, AY-3-8913, the Yamaha YM2149F and the Texas Instruments SN76489, (a slightly crude form of) PWM can be achieved by altering the volume from minimum to maximum and vice versa. That’s similar to how samples are played back on these sound generator chips. It is rather processor intensive though.
[media]https://youtu.be/4xVfuuSty48[/media]
( link )
Mark