Compensating charge rate in DCO?

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: luketeaford, Joe., lisa, Kent

Post Reply
accumulator
Learning to Wiggle
Posts: 6
Joined: Mon Dec 30, 2019 9:55 am

Compensating charge rate in DCO?

Post by accumulator » Sun May 03, 2020 9:05 pm

Hey all,

A while back I was looking at some old DCO circuits and reading up on them and there was one thing that was never explained clearly and I haven't seen any "modern" examples of controlling the charge rate of the capacitor.

So, in a DCO, you might know that a computer controls the reset pulse to discharge a capacitor. Generating pulses on time is something that computers are great at; the implementations and implications are obvious to me. The computer has effectively replaced the comparator pulse in a VCO.

However, the higher the frequency, the less time a capacitor has to charge, so you must increase the charge rate of the capacitor or else amplitude will start dropping off pretty quickly with higher frequencies, right? So, the computer needs to also do the job of the exponentiator, at least partially. I haven't seen anybody really discuss practical solutions to this part of a DCO. Does anyone have any experience in building this part of the circuit or has some examples they can share?

My scenario here: an MCU or FPGA starts with some numerical representation of the desired frequency, outputs the reset pulse accordingly, along with... something else. What is that something else?

Thanks and take care - ACC

KSS
Super Deluxe Wiggler
Posts: 2710
Joined: Mon Jan 25, 2016 7:28 am

Re: Compensating charge rate in DCO?

Post by KSS » Sun May 03, 2020 10:56 pm

Download copies of the Early DCO polysynth service manuals. It's covered in those.

I think Electric Druid also has an article up on his website about it.

edit: Yes he does. https://electricdruid.net/roland-juno-dcos/

KSS
Super Deluxe Wiggler
Posts: 2710
Joined: Mon Jan 25, 2016 7:28 am

Re: Compensating charge rate in DCO?

Post by KSS » Sun May 03, 2020 11:01 pm

accumulator wrote:
Sun May 03, 2020 9:05 pm
My scenario here: an MCU or FPGA starts with some numerical representation of the desired frequency, outputs the reset pulse accordingly, along with... something else. What is that something else?
note number sets time of reset pulse and is used -indexed- to also set a current level. AKA charge rate.

Actually that's only half the story. Some synths set the amplification factor instead. Higher notes equal lower amplitude, which then needs increased amplification.

So the two main approaches are to use the note -or in less advanced schemes the octave- to set either charge rate current or output amplification factor.

accumulator
Learning to Wiggle
Posts: 6
Joined: Mon Dec 30, 2019 9:55 am

Re: Compensating charge rate in DCO?

Post by accumulator » Mon May 04, 2020 3:16 am

KSS wrote:
Sun May 03, 2020 10:56 pm
Download copies of the Early DCO polysynth service manuals. It's covered in those.

I think Electric Druid also has an article up on his website about it.

edit: Yes he does. https://electricdruid.net/roland-juno-dcos/
Thanks for the link. Looks like the Roland DCO has a few coarse range switches. I don’t have a lot of experience listening carefully to this kind of DCO. I wonder how jumpy or seesaw-like the amplitudes fade and jump between octaves. Thanks!

User avatar
Synthbuilder
Super Deluxe Wiggler
Posts: 3009
Joined: Tue Mar 24, 2009 9:12 am
Location: Cumbria, UK

Re: Compensating charge rate in DCO?

Post by Synthbuilder » Mon May 04, 2020 3:23 am

accumulator wrote:
Mon May 04, 2020 3:16 am
Looks like the Roland DCO has a few coarse range switches.
The early Junos (6 and 60) have a proper V/octave CV per voice that controls the charging rate of the DCO and the key tracking for the VCF. It's quite accurate as you can play in tune notes with the self-oscillating filters.

accumulator
Learning to Wiggle
Posts: 6
Joined: Mon Dec 30, 2019 9:55 am

Re: Compensating charge rate in DCO?

Post by accumulator » Mon May 04, 2020 3:53 am

KSS wrote:
Sun May 03, 2020 11:01 pm
accumulator wrote:
Sun May 03, 2020 9:05 pm
My scenario here: an MCU or FPGA starts with some numerical representation of the desired frequency, outputs the reset pulse accordingly, along with... something else. What is that something else?
note number sets time of reset pulse and is used -indexed- to also set a current level. AKA charge rate.

Actually that's only half the story. Some synths set the amplification factor instead. Higher notes equal lower amplitude, which then needs increased amplification.

So the two main approaches are to use the note -or in less advanced schemes the octave- to set either charge rate current or output amplification factor.
I wonder about DAC resolutions here. Also, when you say ‘output amplification factor’, what kind of formula would you be applying to the (linear) DAC output?

accumulator
Learning to Wiggle
Posts: 6
Joined: Mon Dec 30, 2019 9:55 am

Re: Compensating charge rate in DCO?

Post by accumulator » Mon May 04, 2020 3:59 am

The reason I ask is that, if the digital control has to generate a CV that must be exponentiated for charge control, does that negate some of the temperature independence? Or, since the reset pulse is taken care of, are the temperature-dependent effects “not heard as much”, since they would be affecting amplitude and not frequency?
Last edited by accumulator on Mon May 04, 2020 6:49 pm, edited 1 time in total.

KSS
Super Deluxe Wiggler
Posts: 2710
Joined: Mon Jan 25, 2016 7:28 am

Re: Compensating charge rate in DCO?

Post by KSS » Mon May 04, 2020 6:19 pm

accumulator wrote:
Mon May 04, 2020 3:59 am
are the temperature-dependent effects “not heard as much”, since they would be affecting amplitude and not frequency?
This.

But it's hard to talk globally about DCOs when many different methods have been used.

Since you question is less about how it was done in the past and more about how you might do it now, let's plant a few seeds which may become fruitful for you later. No particular order.

Linear are not the only kind of DAC.

A single DAC used alone may not be the best approach.

Likewise with clock(s). A single clock's advantages should not outweigh its disadvantages.
In a modern synth you might want both since single global single clocking of multiple DCOs has its own sound.

A DAC does not need to cover the entire range of desired pitches. Whether for pitch or amplitude.
Since octaves are doubles or halves, the DAC can be pressed to more accurately cover a more limited exponential range.

And finally -speaking as a full-on analog lover and appreciator- we've honestly reached the point where digital 'can' come close enough to analog that it's less about technological capability than proper modeling and implementation of the goal.

You might be better served taking a *very* deep dive into full analog investigations, in order to better apply what you find to a modern digital approach.

We've got to get past the idea that a 'slop' control on a digital osc makes it analog sounding.

accumulator
Learning to Wiggle
Posts: 6
Joined: Mon Dec 30, 2019 9:55 am

Re: Compensating charge rate in DCO?

Post by accumulator » Mon May 04, 2020 7:04 pm

I finally found a complete Juno-6 schematic and I thought I would summarize what I found there in case anyone else is curious. It pretty much matches what I guessed.

Each voice's CV comes from a 7-bit R2R DAC, corresponding to the base note, adding in an analog LFO, analog pitch bend, tune adjustment, and some kind of octave offset, etc., running that through an exponentiator, and using that as the CV.

I was kind of surprised about there only being 7 bits in that DAC at first but I realized that is only the voltage of the base note: at least in the Juno-6, I think that pressing a C key sends the same 7-bit value regardless of octave. There are only twelve notes that need to fit into those 7 bits, so I guess that's accurate enough, since everything else that is going on appears to be happening in analog.

When you said,
A DAC does not need to cover the entire range of desired pitches.
I'm reminded of other fixed-point-ish systems I've seen elsewhere too. IIRC, the Yamaha FM chips used 10 bits frequency (a.k.a. F Number) + 3 bits of octave shift (a.k.a Block Number) and that seemed to have enough resolution to me even with pitch bending.

Thanks very much for your insight. Most of my practical experience is in the digital domain. In fact, these kinds of questions are all about me trying reconcile the digital and analog domains so I can understand them both better, and to get ideas for how to digitally control analog circuits with good resolution and expressivity when I want to do that.

TedGettsterby
Learning to Wiggle
Posts: 14
Joined: Fri Jul 06, 2012 6:20 am

Re: Compensating charge rate in DCO?

Post by TedGettsterby » Wed May 06, 2020 4:09 am

I don't seem to be able to add attachments or I'd post it here but I have a decades old Elektor article on how to generate a constant amplitude sawtooth from a varying frequency square wave. It's a 5 transistor circuit intended for organs but seems it would be a good match for a DCO. Range is 60hz to 10khz. The trade-off is that the wave shape varies over the range but this may be acceptable for some purposes.

KSS
Super Deluxe Wiggler
Posts: 2710
Joined: Mon Jan 25, 2016 7:28 am

Re: Compensating charge rate in DCO?

Post by KSS » Thu May 07, 2020 12:43 am

If you post the issue date and page or article title, it may be found online at one of the magazine repository's.

Assuming that's not where you've already found it. If that's the case the url can be linked.
Last edited by KSS on Thu May 07, 2020 3:28 am, edited 1 time in total.

TedGettsterby
Learning to Wiggle
Posts: 14
Joined: Fri Jul 06, 2012 6:20 am

Re: Compensating charge rate in DCO?

Post by TedGettsterby » Thu May 07, 2020 3:26 am

Good call. I've had this in my files for so long that I'd forgotten where I found it, and my PDF doesn't have the issue and date on every page. But a quick Google turned up this PDF:

https://www.americanradiohistory.com/UK ... 79-179.pdf

It's circuit no. 101 on page 6-14

(That website is a dangerous rabbit hole of wonderful old circuitry - I've detoured lengthily in there many times)

User avatar
Electric Druid
Common Wiggler
Posts: 113
Joined: Sat Mar 31, 2012 1:20 pm
Location: UK
Contact:

Re: Compensating charge rate in DCO?

Post by Electric Druid » Thu Jul 02, 2020 8:14 pm

You've already read about the Juno-6, but I'll just add a few things about the later Juno-106. The "range" octave switching is global and doesn't really affect the actual DCO behaviour except to shift the whole thing up or or down an octave. This is done by altering both the master clock frequency and the integrator charging resistors. Since these alter simultaneously, the behaviour of the rest of the circuit is the same.
This was necessary because the DCO counters and DCO amplitude control DAC didn't have enough resolution to cover a wider range (the DCO counters are only 16-bit - don't remember about the amplitude control DAC).

It's worth thinking about the necessary range for the amplitude control DAC. The CV required doubles for each octave, so a DAC that is required to cover 8 octaves would need at least 8 bits. If you want more than one step per octave, you have to add additional bits. So 12 steps per octave (e.g. NOTES!) and 8 or 10 octaves is going to need at least 12 bit resolution (12 x 2^8 = 3072, 12 x 2^10 = 12288). In practice, the human ear isn't half as fussy about amplitude as it is about frequency, so you can trade amplitude variability for frequency stability, and you'll find that a 12-bit DAC is ok for the full MIDI note range.

Trachea
Learning to Wiggle
Posts: 14
Joined: Fri Apr 28, 2017 9:26 pm

Re: Compensating charge rate in DCO?

Post by Trachea » Fri Jul 03, 2020 11:21 am

Here is a video that I found extremely helpful for understanding DCOs. It is ~40 minutes long:


User avatar
Grumble
Super Deluxe Wiggler
Posts: 1664
Joined: Thu Dec 17, 2015 5:24 am
Location: U aint much if U aint Dutch
Contact:

Re: Compensating charge rate in DCO?

Post by Grumble » Fri Jul 03, 2020 12:16 pm

Over at electro-music.com a while ago there was a thread about this.
READ more
The writer uses an Arduino to control both the charge current for the capacitor as well as the discharge timing for the capacitor.

erroneousbosh
Learning to Wiggle
Posts: 9
Joined: Wed Jul 22, 2020 3:47 pm
Location: Glasgow

Re: Compensating charge rate in DCO?

Post by erroneousbosh » Wed Jul 22, 2020 3:55 pm

Electric Druid wrote:
Thu Jul 02, 2020 8:14 pm

This was necessary because the DCO counters and DCO amplitude control DAC didn't have enough resolution to cover a wider range (the DCO counters are only 16-bit - don't remember about the amplitude control DAC).

It's worth thinking about the necessary range for the amplitude control DAC. The CV required doubles for each octave, so a DAC that is required to cover 8 octaves would need at least 8 bits. If you want more than one step per octave, you have to add additional bits. So 12 steps per octave (e.g. NOTES!) and 8 or 10 octaves is going to need at least 12 bit resolution (12 x 2^8 = 3072, 12 x 2^10 = 12288). In practice, the human ear isn't half as fussy about amplitude as it is about frequency, so you can trade amplitude variability for frequency stability, and you'll find that a 12-bit DAC is ok for the full MIDI note range.
The Juno 106 does indeed use a 12-bit DAC for all its CVs, and the lookup table for the note generation is 12 bit. The lowest note sets the DAC to $0002 and the highest is $0f1b, with the remains of the table filled with $0fff. So it seems like the Juno could create higher frequencies at the expense of saw amplitude.

Rather more than a third of the voice MCU's firmware is lookup table :-)

- EB

KSS
Super Deluxe Wiggler
Posts: 2710
Joined: Mon Jan 25, 2016 7:28 am

Re: Compensating charge rate in DCO?

Post by KSS » Wed Jul 22, 2020 8:49 pm

erroneousbosh wrote:
Wed Jul 22, 2020 3:55 pm
Rather more than a third of the voice MCU's firmware is lookup table :-)
Quoting just to say Welcome to MW, erroneousbosh!

erroneousbosh
Learning to Wiggle
Posts: 9
Joined: Wed Jul 22, 2020 3:47 pm
Location: Glasgow

Re: Compensating charge rate in DCO?

Post by erroneousbosh » Thu Jul 23, 2020 2:19 am

KSS wrote:
Wed Jul 22, 2020 8:49 pm
Quoting just to say Welcome to MW, erroneousbosh!
Thanks! I've been reading it long enough, I figured I'd better create an account...

erroneousbosh
Learning to Wiggle
Posts: 9
Joined: Wed Jul 22, 2020 3:47 pm
Location: Glasgow

Re: Compensating charge rate in DCO?

Post by erroneousbosh » Sun Jul 26, 2020 5:55 pm

Oh, one other thing about the Juno 106 DCO - the "range selector" is only ever set by changing the patch or the panel setting - the full 104(?)-note range is handled by the expo tables in ROM for the DAC and counter settings. In theory you could cover a musically useful range without the range selector and just transposing the incoming note.

You can't set the DCO range on a per-channel basis, which is yet another reason why you can't make a multitimbral Juno ;-)

Post Reply

Return to “Music Tech DIY”