Pitch Correction
I've been practicing both with and without the pitch correction on. Despite having two adjustments (strength and rate) in some instances it seems to help, in others it seems to hinder. I'll use it for a while and like what it's doing, then come back to it later with the same piece and not like it (and vice versa). Here is how it's structured:
The linear 32 bit unsigned pitch number goes straight through to an adder at the output. In the example above it's ramping smoothly from note 0 to note 2.
The pitch number also gets fed to a sub-note splitter, which returns the full width (32 bit) fractional part of multiplication by 12 * 2^5. In the example this gives us two ramps, one for note 0 to 1, and the second for note 1 to 2. The note fraction gets quantized (with settable strength) which distorts the note ramps towards 0 and 1 (on the y axis).
Subtracting the note ramps from the quantized note ramps gives us a correction signal. With no quantization the correction signal is a flat zero. With full quantization the correction signal is a triangle wave that goes from 0 to -1/2 to 0 to +1/2 to 0 over the course of one note transition.
We low pass filter (with settable cutoff frequency) the correction signal, scale it to a one note step, and add it to the pitch number, the result of which is then exponentiated and fed to the tuner, oscillators, and filters.
I spent several hours yesterday googling (duck duck go-ing, actually) to see how others design pitch correctors, and watching videos of them in operation. There doesn't seem to be much out there in the way of what they do with the values once they get them. It's a huge problem to extract pitch, and another to change it, so the few papers I could find concentrated on those aspects. This application is much, much simpler in this regard, as the pitch is absolutely known and given by a solid high resolution number, and changing the pitch is just messing with that number downstream of figuring out what to do with it.
So I'm kind of stumped on how to improve what I've currently implemented, but it seems to need improvement. I've tried 1st, 2nd, and 4th order simple low pass filtering (the equivalent of isolated RC sections all tuned the same) - 2nd order seems to be an improvement over 1st, but 4th doesn't seem much if any different than 2nd.
The behavior I'm not so happy with can be inferred from the diagram with a bit of thought. If you use wide vibrato then the filter integrates the correction signal over more than one note, which tends to un-bias it from the note center.
You want the thing to track larger, faster movements, and then start correcting from there, but how to do you detect this, and how do you get it to recenter when it isn't correcting so that the end note isn't off? I think you want it to correct to the center of more than one note width, but without obvious hysteresis. Ideally there is some kind of non-modal, linear process that can do this, but as usual the problem seems to be secrecy by those who do know. If I find something better I'll share it - whether you want to know it or not! ;-)