I’ve started investigating the idea of making a synth using Arduino as the brain and analog circuits as the voice. As usual, it sounded like a pretty straightforward idea, but quickly turned into a mess. The first problem I’ve been hit with is that the Atmega328 microcontrollers (used in Arduino boards such as the UNO) don’t actually have Digital to Analog Converters (DAC) on their analog output pins. Instead they use Pulse Width Modulation (PWM) to approximate analog signals. Technobabble aside, this means that Arduino isn’t well suited for controlling synth circuits, which generally expect a Control Voltage (CV) to set things like the pitch of a note or resonance of a filter. The other issue is that the control of the PWM waves is too granular anyway (meaning it would be hard to fine tune pitch with it). A lot of folks are interested in this sort of thing, but I’ve yet to see a successful polysynth (able to play multiple notes at once). Yup, I’m a friggin’ pioneer (umm… I did got to school in the Pioneer Valley). Right now I’m looking into using “bit banging” (not that kinda banging, this is turning a digital output off and on really fast to create a square wave) and using separate circuits to shape and filter the waves. Parts of this project looks very useful for that part of the processing:
It’s based on a PIC, which is another popular microcontroller that’s a little less accessible than the Atmel chips (because they’re not supported by Arduino or any similar infrastructure). But really all the PIC is doing is generating tuned square waves. Every thing else is done via analog circuitry. And the sounds are awesome!
But that leads into the next problem… While I don’t think it would be all that hard to generate one square wave in tune (I think), because of the speed limitations of the Atmel328 it’s pretty tough to play several square waves (for polyphony) in tune while also determining which pitches to play… Yup, it’s a pain. I’m right now looking into the idea of using one chip to read keyboard values and a second chip to do nothing but read in digital input and play square waves. But I haven’t yet figured out how the heck to synchronize the two chips. What a trip! But I got some ideas. So who knows! 🙂 For now here are some crazy noises I made investigating the sound capabilities of Arduino.