I've created a tuning algorithm that measures the VCO at 11 points one octave apart, and calculates the correct DAC voltage and steps between octaves. This is used to generate a lookup table that serves two purposes:
- It maps the 10.67 octaves available through midi to the 12.82 octaves available from the VCO
- It corrects tuning
I've also made a looping quick-measuring of the real frequencies of the oscillator using the expected DAC-voltage-to-frequency ratio. This allows me to extremely quickly tune the VCO response to as close to perfect 2 x ratio between octave voltages - a full 11 octave measurement takes around 1s so I get countinous feedback across the hole range while turning the trimmer pot .
There were a few pitfalls along the way.
First of all, when the VCO hardware trimmer is tuned to the correct response, the VCO doesn't reach all the way down to the needed 8.18Hz. This has been fixed by adding a 1.5MOhm resistor from the secondary 1V/oct input jumper to -12V.
Second, I had a hard time getting a proper base frequency. I set the base note by measuring the frequency at 0V and then again at what should correspond to 1 octave up. This makes it possible to calculate the actual response (steps/octave), and based on this I guess the correct voltage for the base note.
It seems however, that there are some linearity issues at the very bottom of the response curve. By increasing the initial guess-voltage for the lowest frequency to slightly above 0V, I was able to get a consistent lowest-frequency guess, which is crucial for the rest of the tuning.
At the moment, tuning takes around 6 seconds. Whenever tuning is started, I use the default untuned/expected volts per octave. It is possible that instead using the current values may be better and could lead to a progressively more correct tuning, though at the moment this seems unnecessary.
No comments:
Post a Comment