I've been thinking for awhile now about a better way to handle the waveform select knob. I'd like to have one knob smoothly transition between all of the standard waveforms, with the option of selecting something in between. It would be easy to have several knobs that control the mix of all of the waves, but that is a lot of knobs, input lines, and panel space.
Let's see if we can do it in one!
In order to generate these smooth transitions between waveforms, I need to actually have equations for them. Making equations for sawtooth waves that turn into triangle waves is pretty easy, just line slope calculations after all. But making a sine wave that can skew was a little trickier..
The equations and graph can actually be viewed online here: https://www.desmos.com/calculator/6efi3uujjr
So I currently only have a moving saw - triangle wave, and a deforming sine wave. Fortunately, the other inbetweens for the other waveforms can easily be generated by using LERP interpolation between the points. I'll store waveforms for Saw to Triangle, then LERP from triangle to sine, and then again to square.
From there I might start decreasing the pulse width, then transition to an exponential saw and back to the regular saw for full circle.
I'm worried about how much RAM I am going to take up with waveforms. It would be nice to calculate them on the fly, but I think it would be too slow...
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.