What's Happening?
So I've got assembly code running that grabs the pitch info and linearizes it via the method described above. The LCD allows me to observe (via more code) 32 bit hex values at any point in the chain, and the 4 encoders (via even more code) allow me to easily alter up to 4 values.
I've also got code that takes the linearized pitch number and performs PWM on the LED tuner.
I'm seeing pretty much what my spreadsheet predicts in terms of linearity, the pitch change poops out in both nearfield and farfield, with maximum change in the mid field. The gain difference is quite noticeable, on the order of 50% or so, and isn't nearly sufficient in terms of linearity. So that's a disappointment.
The LED display is maybe too antsy seeming to really be useful. I've tried both positive (only one LED on) and negative (only one LED off) modes. One thing that helped a lot was squaring the subnote data before applying the PWM count, this seems to compensate pretty well for the log response of the eye to brightness. I also need to try not modulating the center LED to see if that helps readability. Another thing to try is applying a slight brightness to all the LEDs with an otherwise positive type display. I'm hoping some combination of things will make it useful, otherwise the hardware needs a redesign. I'm running the LEDs at bare minimum brightness (settable via a register in the serial driver) as anything higher is blinding to stare into, so I should probably lower the analog current set resistor on each serial driver to something lower than 15mA max. The PWM cycle rate is 180Hz (to get filtered out by a CIC hum filter notch) and there are approx. 256 gray scales. The display doesn't seem to be noticeably influencing the pitch field (huge relief). The octave is a hex number on the seven segment display that transitions via PWM at the B to C note transition.
As for linearity, my edit in the previous post is due to my not mentioning the fact that AFAIK the operating point for the open.theremin is not exponentiated before being fed to linear NCO code. In my spreadsheet I applied a log2 function to the linearized data and believe it or not it looks to have almost exactly the same shape both before and after the log2! So the numbers coming out of linearization are somewhere between linear and exponential (I think ILYA was trying to tell me this). Weird. I would prefer linear so that the display can be fed directly and the NCO input exponentiated, otherwise I would need to do log2, offset and gain, and then exponentiate. I can't believe how much time I've put into linearization theory only to end up here with very little to show for it. I'm thinking of trying curve fitting in Excel to generate a simple polynomial to make the raw data (or some simple transformation of it) linear. But I don't want a bunch of things to adjust, anything beyond one or two knobs gets overwhelming, and I can see why they automated the calibration process in the Theremini.
Anyway, except for actually making noise, IT'S ALIVE!