[sdiy] Digital VCA

Neil Johnson neil.johnson97 at ntlworld.com
Sat Aug 27 12:04:35 CEST 2011


Hi,

>  From a digital perspective, is a VCA really as simple as multiplying
> the digital value of the signal input with the digital value of the
> control input, then dropping the least significant bit? (That's assuming
> I'm multiplying two 12-bit numbers, then dropping the last bit of the
> 13-bit result to get 12 bits again.)

Multiplying two 12-bit numbers produces a 24-bit result.  You want the 
top 12 bits of the result.

> The main issue I have identified so far is how to handle signals that
> are too large. The CV input of my ADSR/LFO has Zener protection, to snip
> the incoming voltage off at 5.1V (running the CPU at 5V, and am
> standardising on this for my control voltage level, if not signal
> level.)

What is the reference voltage into your ADC?  If it is an internal one 
it might well be rather less than 5V.  You need to scale appropriately.

 > As far as the VCA is concerned, I was thinking of doing the
> same, but having "clip" LEDs that light whenever the the digitised value
> of the signal hits 4095.

I would set the limit a bit lower, otherwise you only get indication 
when you actually do clip, rather than some early warming.  Perhaps at 
-3dBFS?

> (Or maybe a certain number of samples hit that
> value in a specific time. I'll probably be running the ADCs/output DAC
> at 50ksps - a bit fast for the eye to perceive!) I guess I could have
> other LEDs that come on at lower values, too.

Use a software version of a monostable - when it triggers from the 
overload detector the output stays on for a minimum time (e.g., 50ms). 
How you do that depends on how your software is designed.

Cheers,
Neil
-- 
www.njohnson.co.uk



More information about the Synth-diy mailing list