Classic sine/square/ramp/triangle it's pretty trivial yeah; quarter sine is standard for tables, although a 6th-order polynomial approximation also works. You only really need a ramp though, which needs a half-ramp, because you can sum ramps to get squares and triangles. Square also requires only 1/4 period but that's because all odd-order harmonics share a peak at the first peak of the fundamental, but again…just store a ramp.ps. Well, if you constrain phases, then sure you can use symmetry.. but this then means you can't pick arbitrary waveforms. Doesn't necessarily matter for classic analog waveforms, I guess. Perhaps in hardware such symmetry is worth the trouble, in software in general it's just cheaper to store the whole thing and not complicate the indexing logic.
One thing that's hard is sine hard sync. There's a significant amount of research on avoiding aliasing when resetting a sine (exhibit A, B, C), but not nearly as much as resetting other waveforms. I've considered doing sine hard sync by moving the driving oscillator up 2 samples, and then replacing the 2 samples before and after the discontinuity with the 2 samples before and after the discontinuity in the band-limited saw, scaled to the amplitude of the sine and offset to glue it together. That seems overly complicated and won't work though.
I'll cross that bridge when I come to it. The part I'm designing right now doesn't do that; it's an AY-3-8930 clone with an enhanced mode. I'm going to need to rework the block diagram, though; wavetable seems the way to go for this purpose.
The overall architecture is not that complicated compared to the original AY-3-8910:
The LFO was surprisingly complex, but not a problem:
The LFO lets me add three things: amplitude modulation, vibrato, and a chorus effect by generating a second waveform per channel (mix dry with vibrato). That effect is extremely nice, as can be seen at the end of this video.
(Yeah, this entire thread just trying to figure out how to do that…)
Statistics: Posted by jrmoserbaltimore — Mon Jan 01, 2024 1:45 am