After talking to some other DIYers about what exactly "digital can do for you", so to speak, I thought it would be useful to give some an overview of what the options are out there for digital/programmable circuits and what their intended use is. I'll try not to belabor too many points, and also this is assuming you know a little about some basic concepts (voltage, programming, MIDI, etc).
First, just to give a basic overview of what it means to be digital (you can skip this if it seems too basic or confusing). The difference between an analog and digital circuit is basically that the digital domain operates with two levels - high and low - while analog circuits work with basically any voltage level. Now these on/off levels can be interpreted in a lot of ways, and one way that people make use of them is to treat a bunch of them as a (binary) number. For those programmers out there, this is what is meant when you talk about a 32 bit number - this is basically a group of 32 on/off levels which are being interpreted as a number. When you talk about digital audio, normally an analog input signal (say, from your guitar) is estimated every-so-often to one of many levels. Specifically, it's not uncommon for your signal to be estimated, or quantized, at a rate of 44.1khz to one of 2^16 values. This is well-explained elsewhere
so no need to focus on it too much. Now, one nice thing about these groups of on/off levels is that it's really easy to do certain things to them - for example, sum them up, compare them, etc, all of which is somewhat more difficult to do perfectly in the analog domain. One reason people like analog circuits is that often the imperfections are interesting and musical, but that's a separate discussion. Other digital signals, like MIDI, are similar - they are just strings of on/off which are interpreted in some way.
So with that out of the way, probably the simplest digital circuit
is just that - basically a circuit which is intended to be used with on/off levels. You don't see this a lot anymore; normally this is in the form of a bunch of transistors wired in a certain way or a lot of CD4000
ICs. It used to be that fairly complicated circuits would be made in this way; look at older (80s or so) digital delays, MIDI devices, and even modern DIY sequencers
. Shown below is the Music from Outer Space 10-step sequencer
which is a nice example of a digitally-controlled circuit using CD4000 chips. You might want to look into this kind of circuit if what you're doing is fairly basic and you want it to be low cost and high speed.
Probably the next most primitive device is the microcontroller
. You can think of a microcontroller as a pretty fully-featured digital circuit which has been crammed into a single IC. By-fully featured, I mean that it has most of what you need - analog to digital converters, digital input and output, and the equivalent of TONS of 4000/7400 series chips. With a microcontroller, rather than wiring up a specific digital circuit to control something, you instead program it with a separate computer. You can write microcontroller programs in lots of languages, including C, BASIC, and assembly. The two most popular brands of Microcontrollers for DIYers are PIC
. The two kinds of chips are fairly similar, but unfortunately it's difficult to use code for one tip of chip on the other. I use AVR because it's been easier to program them with my Mac. Another increasingly popular microcontroller solution is the Arduino
(shown below). The Arduino is actually an AVR at its core, but with additional circuitry to take a lot of the headache out of microcontroller programming. This comes at an expense; an Arduino is not something you could really put into a product and sell, and some of the convenience comes at the cost of flexibility and speed. That being said, I think the Arduino is a great choice for DIYers new to programmable circuits. You can sort of think of using an Arduino as breadboarding, and using an AVR or PIC as using perfboard - you can put the latter in a product and the platform is less rigid, but it takes more time and effort to use. The main drawback of microcontrollers is that they tend to be fairly slow for processing audio. By processing audio, I mean taking an analog input signal, converting it to a digital one, doing some operation on it (say, applying some gain or a filter), then converting it back to analog. Most microcontrollers are just not fast enough to do any complex processing, so with a microcontroller you're limited to control circuits. By that I mean things like tap-tempo LFOs, sequencers like those above, etc.
Now if you want to do some serious processing, you'll need to get into DSP
(you guessed it - digital signal processor) chips. These are somewhat similar to microcontrollers, except that they typically have fewer built-in conviences (for example, no analog to digital converters) and they are often much faster. If you want to build a digital flanger, for example, or a looper, you'll want to get a DSP. Unfortunately, there is considerably less information on the net about DIY DSP chip programming, and as far as I know there's no cheap and easy entry-method like the Arduino. There are series of AVR and PIC which are meant for DSP, called AVR32
(shown below), but these are somewhat less common in the real world than offerings by TI
and Analog Devices
. That being said, there are some pretty solid communities discussing the AVR and dsPIC chips on the net, so it's not a bad place to get started. That being said, there's a lot of good information at sites like DSPRelated
on both embedded (IE, in a dedicated circuit) and PC-based processing. One final note about DSP's is that it is fairly uncommon to find them in DIP form, so either get ready to do some SMD soldering or get a development board!
One last category is one on which there is probably even less information, and that's the FPGA
. You can also think of an FPGA as a programmable digital circuit, except that they can be much more specific - FPGA stands for "Field Programmable Gate Array", which basically means that you can directly control how the chip's internal digital gates are connected. FPGA programming is pretty extreme, but some audio DIYers are into it - FPGA synth
(one of which is shown below) is probably the best example. FPGA's are great for when you need something done very quickly and very efficiently - sound synthesis is something that benefits greatly from this. I actually recently found out about a somewhat Arduino-analagous device for FPGA design, the beMicro Evaluation Kit
but I've never used it and as far as I know it is not nearly as well-adopted as the Arduino.
So, I hope that was all helpful. If anything is unclear, please let me know - one problem with learning is that it's easy to forget what points were hard to understand once you understand them!