Re: next gen engine ideas
I believe there may be another way of fak... err, I mean generating a saw wave on beeper. For this, we need to look at the frequency spectrum, rather than the waveform. In the frequency domain, a square wave is characterized by having a peak at each odd harmonic. That means, for a 440 Hz, 50% duty square wave, frequency components will be present at 440*3, 440*5, 440*7 Hz, and so forth, but not at 440*2, 440*4, 440*6 Hz etc.
A saw wave, on the other hand, peaks at both even and odd harmonics. Thus it can be approximated by mixing a series of square waves with frequencies of f, f*2, f*4, f*8, etc. With the "fast accumulation" technique (add hl,de \ ld a,h \ out (#fe),a) we can easily achieve this by rotating A to get the required multiples. Doing this with 3-4 frequencies should already give a reasonable approximation of a saw, because the missing components will be high enough to fall out of the range at which humans can reliably detect the difference.