[sdiy] Making a 2164 “linear” with a digital envelope generator

Tom Wiltshire tom at electricdruid.net
Sat Feb 10 19:53:26 CET 2024


I did this in PHP once. Here's the working:

	// $lin = 3300 * pow(10, -1.5 * ($cv/1000));
	// $lin / 3300 = pow(10, -1.5 * ($cv/1000));
	// log10($lin / 3300) = -1.5 * ($cv/1000);
	// log10($lin / 3300) / -1.5 = $cv/1000;
	// log10($lin / 3300) / -1.5 * 1000 = $cv;

Once I'd got PHP plotting the right compensation curve, I generated it as a look-up table of values, and then you can just plug the envelope value in, get a compensated value back, and send that to the VCA. The problem you get is that the values are all bunched up, so you lose some resolution in certain bits of the curve. In practice, it's not a dealbreaker.

HTH,
Tom

> On 10 Feb 2024, at 15:08, Benjamin Tremblay via Synth-diy <synth-diy at synth-diy.org> wrote:
> 
> Hello, quick question.
> I have used Teensy PWM to control the 2164 as a programmable stereo mixer. 
> Could I use a similar circuit to produce a conventional VCA response if I processed my Teensy digital envelope generator with a function? What would that function look like in C++?
> 
> Thanks,
> Benjamin 
> Benjamin Tremblay
> ________________________________________________________
> This is the Synth-diy mailing list
> Submit email to: Synth-diy at synth-diy.org
> View archive at: https://synth-diy.org/pipermail/synth-diy/
> Check your settings at: https://synth-diy.org/mailman/listinfo/synth-diy
> Selling or trading? Use marketplace at synth-diy.org




More information about the Synth-diy mailing list