VCO, LFO, DCO, DDS notes

From Helpful
Jump to navigation Jump to search

The physical and human spects dealing with audio, video, and images

Image: file formats · image noise reduction · blur detection · halftoning, dithering · illuminant correction · Image descriptors · Reverse image search · image feature and contour detection · OCR · Image - unsorted

Displays: Video display notes · before framebuffers · Simpler display types · Display DIY ·· Screen tearing and vsync · Arguments for 60fps / 60Hz in gaming‎‎

Video: file format notes · video encoding notes · Subtitle format notes


Vision and color perception: physics, numbers, and (non)linearity · objectively describing color · the eyes and the brain · color spaces · references, links, and unsorted stuff · Lux and lumen

Audio physics and physiology: Sound physics and some human psychoacoustics · Descriptions used for sound and music · multichannel and surround · Sound level meter notes


Noise related: Stray signals and noise · sound-related noise names · electronic non-coupled noise names · electronic coupled noise · ground loop · (tape) noise reduction · strategies to avoid coupled noise · emphasis · Sampling, reproduction, and transmission distortions

Digital sound and processing: capture, storage, reproduction · on APIs (and latency) · programming and codecs · some glossary · audio noise reduction · Audio and signal processing - unsorted stuff


Music electronics: device voltage and impedance, audio and otherwise · amps and speakers · basic audio hacks · Simple ADCs and DACs · digital audio
On the stage side: microphones · audio levels & technical gritty · devices you'll use · cables, connectors, adapters · effect hardware · sync

Electronic music and DIY:

approaches to making sounds · some history · interesting instruments · Gaming synth ·
Synth: MIDI · sync · Electrical components, small building blocks · VCO, LFO, DCO, DDS notes · microcontroller synth · audio platforms
modular synth: formats (physical, interconnects) · physical · Learning from existing devices · eurorack power supply ·· Modules/makers of note: Mutable instruments
DAW: audio plugins · Ableton notes · MuLab notes · Mainstage notes · VCV Rack notes


Unsorted: Visuals DIY · Signal analysis, modeling, processing (some audio, some more generic) · Music fingerprinting and identification

For more, see Category:Audio, video, images


VCO - Voltage-Controlled Oscillator

VCO can be any design of oscillator where we can control its rate via a voltage input signal (hence the name),


It often refers to audio and/or analog designs,

because in digitally produced audio you would think about DCO, DDS and such,
and in purely digital electronics you would often call it a clock source


Most early synths had analog oscillators, also the somewhat later ones that were quite controllable.

Fully analog designs are imperfect, and hard to tune, though that can be musically interesting in itself.


Ramp core (analog)

Say, a classical 'ramp core' sawtooth VCOs may be implemented as an integrating op-amp with a capacitor charging linearly; at a certain level, that resets and discharges.

LFO - Low-Frequency Oscillator

A Low-Frequency Oscillator (LFO) is functionally just a VCO but slower.


But the fact that these may go well below frequencies that we can hear may mean that direct adaptation from VCO may run into some details that weren't problems at audio rates.

That, and the fact that LFOs are used for different things, means that your design goals are a little different.

DCO - Digitally Controlled Oscillator

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.


A Digitally Controlled Oscillator (DCO) is a digital implementation of a voltage controlled oscillator (VCO).


That is, at least some parts of the process is, though exactly which parts varies.

Most people seem to mean DCO as "creating an oscillation where the frequency/period has something digital to keep it in tune", addressing the tuning instability of (particularly early, and non-synchronized) analog VCO designs.

In musical context, other parts of the circuit, like filtering and e.g. waveshaping, may frequently still be analog..


Used e.g. in some mid-range eighties synths, e.g. Roland Juno, some Korg Poly (verify)


Where e.g. a fully analog VCO, such as a ramp core generating a sawtooth, may be using a capacitor to ramp up and a comparator to reset, a DCO may use a programmable counter (like a 8253)(verify).


(or, in DDS, numerically controlled oscillator)

DDS - Direct Digital Synthesis

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

DDS (Direct Digital Synthesis) (a.k.a. numerically controlled oscillator) indicates a particular way of digitally generating waveforms.


DDC ICs, versus DDS as a technique

DDS is capable of a fairly wide frequency range and not really tied to any rate.

...but DDC ICs are typically dedicated to the task of higher, MHz-rate function generation, and more for lab equipment function generators, and some telecom needs, where simpler signals at higher frequencies are most useful important.


When you have more musical uses, there is value to finding or making audio-range DDS instead of using a tiny range of such a general IC.

The frequency range to focus on is just a design choice, so you can focus on audio range better.

And as a technique, DDS easily lends itself to arbitrary waveforms and even sample playback, and in fact has been used by various samplers, and by some synthesizers that can sample, because it's pretty good at dealing with varying target frequencies, and at audio frequency it is not at all opposed to feeding it more arbitrary waveform data from ROM, RAM, or something external.


DIY DDS (as a means of introducing the workings)

If you're DIYing this, there are some further implementation details.

DDS is more about how to use a clock source, and some of the 'how to use this to produce output' is still up to you and context.

Actually, trying to make this on a microcontroller can be a good introduction on how the core of DDS works.


Say you wanted to play one sample at an arbitrary rate.

Or perhaps three at once each at their own rate.

How would you do that?


If you've meddled with sample playback, you know you need some very regular output, to the point that if you are doing this with a DAC, you might want one with a small buffer, or spend much of your time making a buffer do regular output on the uC side.

And that's just, for one. But what about three?

It seems a mess to organize both the timing of three clocks, and the output events they dictate.

But even if your hardware gives you multiple clocks/timers, you can rarely make one go at arbitrary rates (because those usually come from clock division), so how do you get any flexibility on playback rates?


Yet what if you used just one had one clock (considerably faster than your sample rate), and did a much larger, faster count, that somehow moving onto the next sample only every many counts?


"Okay, but that sounds very similar. Why does that help?"

It is similar to clock division. And if done in software it is even less efficient, but it helps for other reasons.


One, you can easily keep increasing multiple counts at different rates (that need not be integer multiples of each other).


And in an fixed-point integer-like trick, you forget(/divide/shift away) some amount of lowest bits, and then use that as an index into the waveform you want to put out.

If you can vary the amount of those lower bits you throw away, you can trade speed and precision.



Perhaps most usefully, this means you now don't need to control that main clock precisely - or even at all - to change the playback rate. You just need a regular clock (which we needed anyway), a counter, and a bitshift. Those are cheap operations even in software (and DDS is relatively east to implement in hardware, which is why fast DDS ICs exist).


DDS would call that counter a phase accumulator (for good reasons that you'll understand when reading up on the details).

The waveform can be anything from a simple table, to memory external to the generation part (possibly ROM) - and you would only need one cycle of it, so the phase essentially is the index (with some extra possible tricks for symmetric waveforms).

(This is technically just the simplest form of DDS, phase truncation DDS. There is also dithered DDS, which does much the same but suppresses some harmonic-frequency issues (up to 12dB(verify)), at the cost of a slightly higher noise floor)


NCO - Numerically Controlled Oscillator

Unsorted