[sdiy] Controller design

rsdio at audiobanshee.com rsdio at audiobanshee.com
Wed Dec 30 20:18:46 CET 2015


On Dec 30, 2015, at 2:11 AM, Thomas Burdick <thomas at burdick.fr> wrote:
> Having the processor tune the CVs sounds like a fair amount of programming, considering I have not only the nominal notes, but pitch bend to contend with, but is something to think about. I have a PWM component to the VCO, so getting a square wave to the digital input would be no problem.

Just to be clear, the tuning process happens at startup, before you're actually listening to the synth. It should be fairly quick and painless.

I don't know why pitch bend would make it any more complicated, except that you'll either have to assume that the mapping is perfectly linear or test a lot of frequencies to be sure that you've corrected any nonlinearities. If the errors are linear, then you only have to test two frequencies per VCO. If the errors are more complex, and drift out only in the top octaves or just the lowest notes, then you'd need to measure multiple points along the frequency range.

The typical 8-bit MCU usually has at least one Timer peripheral, if not three or four. These can be set up to read a GPIO pin and measure the period in hardware. If you pick the right pre-divide values for the clocks, and select a 16-bit Timer, then it should be fairly easy to measure frequency by focusing on the period length. Actually, low frequencies become more of a problem because of their really long period, but this can be handled by running the counter at the right frequency. You may need to change the counter frequency if your VCOs span several octaves. Freescale's Kinetis ARM chips have a nice FTM (Flexible Timer Module) that I've used for frequency measurement. It calls an interrupt subroutine after it has measured one period, and your code can simply note the value and set up for the next frequency measurement.

Brian Willoughby
Sound Consulting




More information about the Synth-diy mailing list