Magazine Archive

Home -> Magazines -> Issues -> Articles in this issue -> View

Equally Tempered Digital to Analog Converter



Many experts will tell you that in order to interface a computer to an electronic music synthesizer, you must use exponential response voltage controlled elements (oscillators, filters, amplifiers, etc.).

Here's why:

Computer control of synthesizers requires a Digital to Analog converter to change the numbers that the computer puts out into an analog control voltage that the modules can use.

By far the most common type of D/A (so common that many seem to think it's the only kind) is known as an "R/2R ladder". I don't want to get into the design details of this circuit. If you are interested, there is plenty of information available from text-books, manufacturers literature, etc. But we do need to examine a functional aspect of this circuit.

Any analog to digital converter works by accepting at its input a digital quantity (we will call this data) and generating at its output an analog voltage that is a unique representation of that data. Most of the D/A's that I'm familiar with accept the data as binary digits - a bunch of 1's and 0's that appear simultaneously on a group of wires going into the converter.

In a R/2R ladder converter, a unique weighting is assigned to each bit in the data coming in. When the time comes for a conversion to be made, the circuitry adds together the weightings corresponding to the bits in the data that are in an "on" state (for our purposes, a 1; through not always) and ignores the weighting represented by the bits that are "off' - equivalent to adding in a zero.

If we assume that we are going to be using exponential response oscillators, the R/2R ladder converter works quite well. We can assign weightings to the bits that are integral multiples of 1/12 volt; the same incremental voltage change that keyboards designed to operate exponential oscillators produce, and when we do we come up with a series of weightings which - progressing from the Least Significant Bit (LSB) to the Most Significant Bit (MSB) - Looks like this:

Figure 1


Where n is, of course, the number of bits that the converter can accept as data.

Let's watch four bits "count" into this type of converter and observe the resulting output voltages.

Table 1


If I had made the "word" (collection of 1's and 0's going into the converter) 6 or 8 bits long instead of just 4, the resulting series of output voltages would still increase 1/12 volt for every unit increment of the data and the only effect would be to increase the range of the output voltage.

Unfortunately, while the distinguishing feature of an exponential oscillator is that equal incremental voltage changes will cause it to generate a series of equally tempered pitches, this is not the case for linear response oscillators. A linear oscillator requires constantly increasing voltage increments to produce equally tempered semi-tones.

While this increasing voltage requirement doesn't make the application of R/2R converters to linear oscillators impossible, it certainly makes it cumbersome.

Cumbersome because we have to make the incremental change from the converter small enough to guarantee that there will be some pattern of 1's and 0's that defines a control voltage reasonably close to what we're really after.

Very small voltage increments - there are three things "wrong" with this:

1) We're going to need a "bigger" converter - one with greater resolution and consequently greater word size. Whereas 6 bits of data will provide a little more than 5 octaves of control voltage to an exponential oscillator; the same 5 octaves from a linear oscillator will require 12 data bits. Now, if that doesn't offend you by its notable lack of elegance, it's cost certainly should. A 12 bit D/A is going to set you back about $100.00; then you've got to put it on a pc board, add controls - front panel, etc.

2) As if to add insult to injury, there will be lots of combinations of bits that represent the intervals between adjacent semi-tones, but notice that they are not equally tempered intervals and therefore next to useless even for micro-tonal tunings. We're paying out our hard earned bucks for words that we're never going to use, but must have to fill up the "cracks".

3) We've turned the determination of what data to output from a relatively simple matter of counting the keys and using that as the data into a process that at best is going to require a lookup table (where the machine says "Aha - key number 12, that's note 0001110010100001") or some such similar computer calisthenics. Not particularly complicated, perhaps, but why bother with it if we don't have to.

And that, friends, is the point of all this. We don't have to. For the simple reason that an R/2R ladder converter is not the only kind that we have to work with. There are other kinds. One of the other kinds is called a Multiplying D/A (or just MD/A, I guess).

While the most important operational feature of the R/2R ladder converters was that it added things to arrive at the output, the dominant feature of an MD/A is that (you're ahead of me, right?) IT MULTIPLIES.

Far out.

If you're up on your basic music theory, a responsive chord (if you'll pardon the expression) should be struck here. The determination of the frequency of the pitches in equally tempered tunings is itself a multiplication process. The frequency of each semi-tone in the series is greater than the frequency of the preceding semitone by a factor of 21/12 - the infamous "twelfth root of two" (21/12 = 12√2 = 1.059). Intuitively, it would seem that this type of D/A would be more appropriate for our purposes.

In fact, this is true. We assign weightings to the bits (starting with the LSB) according to this series;

Figure 2
[Errata: there should be a comma after 28/12]


Where again, n is the number of bits of data that the converter will accept.

Now, we count into this converter the same way that we did in the R/2R ladder type. Remember that bits that are "off' here are not included in the total (only now this is equivalent to multiplying by 1) and that the product that results from the condition of the data will be multiplied by some internal reference voltage.

Table 2
Errata (from reader): "Table 2 has the wrong results. The last term should be 2^15/12xVref not 2^5/12xVref. (8+4+2+1 = 15)"


* Multiplying a base number raised to various powers (exponents) is accomplished by adding the exponents. That's how a slide rule works - remember slide rules?

You may recognize this as an equally tempered series (if not you'll just have to take my word; it is). All we have to do now is design a circuit that does this.

Let's do that.

Here's a simple unity gain buffer amplifier:

Figure 3


You may not be used to seeing it in this form because ordinarily the resistances that are shown would be replaced with direct connections. But having the resistances there doesn't matter simply because for any practical case, they are going to be much smaller than the equivalent resistance from either of the operational amplifier's inputs to ground. I should mention here that for any linear operational amplifier circuit the voltages at the inverting and non-inverting inputs are equal (Vi+ = Vi-; this is the key to op-amp design, but that's another story). Of the circuit in figure 3 we can say:


An excellent beginning. Here's another circuit:

Figure 4


Adding R2 to the circuit has produced a voltage divider at the + input of the op-amp and because of this we can say:


Fantastic. Now we change the circuit again so that it looks like this:

Figure 5


and instead of a voltage divider at the + input we now have one at the - input. This means that:


All together now:

Figure 6


And for this configuration:


Do the four equations from (a) - (d) look familiar? No? Look back at Table 2. Now do they look familiar? Still no? Then let's say:


and then by making these substitutions and putting the equations together:


Now you must certainly recognize them - it's the same series as the first four entries in Table 2. Putting the resistors R2 and R4 into the circuit and removing them is simply a matter of putting switches (either mechanical or electronic) in series with them and when we do the whole circuit looks like this:

Figure 7


The switches S1 and S2 here are, respectively, the Least Significant and Most Significant data inputs to the converter; and I will avoid the obvious comment about this being a 2 bit D/A.

Oh, but there's one thing that I forgot to tell you:


Why? Because 21/12 is a number greater than 1 and the only way that the ratio of a number to itself plus something else can be greater than 1 is if the something else is negative - which in our case, it's not (yes, there is such a thing as negative resistance, but the concept is not applicable here).

Happily, we have an alternative to negative resistance and that is to make:


Making the exponent negative is equivalent to taking the reciprocal of the number.

At this point I'm afraid that in the interest of brevity I must make a gigantic leap and say that — because we're using the reciprocal of the weighting, we must also complement the bit representing that weighting. In the instruction manual for this module, we will cover why. But there's not enough space to do it here. And, in any case, any of you who really want to can figure it out for yourselves. It's easy, honest.

Expanding this D/A out to handle greater word lengths is simply a matter of cascading several of these sections. When we do this and replace the mechanical switches that we had earlier with 4066 type Quad Bi-lateral CMOS switches we come up with a thing that looks like the circuit shown in figure 8.

Figure 8
(Click image for higher resolution version)


Notice that the complemented bits that we require are indicated by the overbar on like D0 for instance. This is read "not D0' and by custom indicates that the low (0) state is considered to be "on".

You are probably also wondering about those Ra's, Rb's, etc. The values of these resistors are determined by solving equations (a) through (d) and they produce some strange values that need to be exact. 5%'ers won't get it here. In order to meet the necessary precision and stability requirements, we've had "one of the nation's leading resistor manufacturers" (at least that's what they say) make up some custom Cermet resistor networks. They look about like any 16 pin DIP IC (except that they're a beautiful robin's egg blue), but inside are resistors instead of other stuff. Once manufactured, they're trimmed by LASER to be exactly the right ratios (Laser, yet - how about that!).

I really don't expect that to impress you too much, but this should:

THERE ARE NO ADJUSTMENTS TO THIS MODULE

You just put it together and it "plays" (which is the computer people's phrase for works).

Do you realize that this gets rid of all those trimmers from our old -8 keyboard - it even gets rid of the zero pot. I really like it.

But we're really not through yet, we need to completely dress the design by adding input latches (so that the input information can be stored), and some kind of indicators so that we will know what's going on (LED's - they wink, they blink, they twinkle like stars in the night; anybody can look at this thing and know that it's got something to do with computers). This part of the circuit is shown in figure 9.

Figure 9
[Errata: CA3401 will not work for IC5. It MUST be 4136 quad op-amp.]
(Click image for higher resolution version)


The 4042's are the latches and one of their features is that they have both Q and Q (the complement of Q) outputs - since we needed some complemented data bits, this is nice. Q9 - Q14 are level converters. We need to have the "on" resistance of the 4066 switches in the converter circuitry working at as high a supply voltage as possible in order to achieve predictable low "on" resistances and this means that they operate from the +9v. synthesizer supply rather than the +5v. logic supply.

That's the design. Let's take a few minutes to review what we've got here.

We've got a new synthesizer module that does at least one thing that many people thought couldn't be done: a 6 bit Digital to Analog converter that will provide slightly more than 5 octaves of equally tempered control voltage to linear response voltage controlled synthesizer elements.

The front panel PITCH control allows the module's output to be chromatically transposed over another octave, so the total range of output voltage available is a little more than 6 octaves (compared to typically 4 octaves for a #4782 keyboard).

We have two trigger flags available, either of which can be set or re-set independently (very handy). As we will see in a future issue, these flags can also be used to select micro-tonal intervals.

The status of the 8 bits of data coming into the module is displayed on the front panel LED's, six of which indicate the note that the module is producing and two of which indicate the status of the trigger flags.

To make the module easy to interface to anyone's computer (or simply keyboard encoders - see LAB NOTES) we have an input terminal marked RDY (not ready). When this terminal is grounded, the latches that are provided on the data lines are in a "pass" condition and any changes of the data on the data input lines will be reflected as changes in the module's output voltage. When the RDY line is taken to a high logic state, the last data that appeared on the input lines is stored in the latches and further changes on the data bus will not produce any change in the output voltage (this is about like the action of the SAMPLE inputs of clockable sample and holds).

The road to applying the processing and control power of the computer to electronic music synthesis is not a short one - but it is certainly a trip worth taking. The Equally Tempered D/A is only a first step.

As first steps go, though, this is a good one - like walking in seven league boots.


More with this topic


Browse by Topic:

Electronics / Build



Previous Article in this issue

New From PAIA


Polyphony - Copyright: Polyphony Publishing Company

 

Polyphony - Oct 1976

Donated & scanned by: Vesa Lahteenmaki

Feature by John Simonton

Previous article in this issue:

> New From PAIA

Next article in this issue:

> A Low Cost, Special Purpose ...


Help Support The Things You Love

mu:zines is the result of thousands of hours of effort, and will require many thousands more going forward to reach our goals of getting all this content online.

If you value this resource, you can support this project - it really helps!

Donations for June 2022
Issues donated this month: 0

New issues that have been donated or scanned for us this month.

Funds donated this month: £49.00

All donations and support are gratefully appreciated - thank you.


Magazines Needed - Can You Help?

Do you have any of these magazine issues?

> See all issues we need

If so, and you can donate, lend or scan them to help complete our archive, please get in touch via the Contribute page - thanks!

If you're enjoying the site, please consider supporting me to help build this archive...

...with a one time Donation, or a recurring Donation of just £2 a month. It really helps - thank you!
muzines_logo_02

Small Print

Terms of usePrivacy