[sdiy] Soft ADSR ways?
Paul Perry
pfperry at melbpc.org.au
Mon Feb 14 13:46:01 CET 2011
No, I hadn't meant to have an analog output - my idea was to
(somehow!) do some RC exponentiating outside the micro (though started and
sensed by it.)
I'm all for I2C zipping around.
And micros are so cheap now, one should think of them as the 555 of today -
and spread them around,
rather than try to shoehorn everything into a single one.
paul perry melbourne australia
----- Original Message -----
From: "Tom Wiltshire" Sent: Monday, February 14, 2011 10:17 PM
Subject: Re: [sdiy] Soft ADSR ways?
On 14 Feb 2011, at 05:04, David G. Dixon wrote:
>> I'm suprised nobody is using a hybid approach to this..
>> after all, the micro has output pins that are begging to be toggled to
>> charge & discharge caps -
>> and one could monitor these with an AtoD input.
>> I think you could keep the digital in & out, but pass the heavy
>> calculating
>> to the 'analog' side.
>> Depending how you want to throw it into the rest of the system.
>
> I was thinking exactly the same thing. Use an RC network to make the
> envelope sections (with optional switching between linear and
> exponential).
> One could use digital PWM to determine the effective resistance of the RC
> resistor (see pg. 178 et seq. and Fig. 4-23 of the TTL Cookbook by Don
> Lancaster for inspiration). If the resistor is switched in and out of the
> circuit by a clock, and the time it spends in the circuit is dictated by
> the
> variable PW of the clock signal, then the effective resistance (and hence
> the delay time) will be proportional to the PW of the gate. Eight bits of
> PWM would give 256 different delay times, and the exponential character of
> the delay would be achieved naturally, in analog.
>
One good reason not to is that you finish up with an analogue output...No,
seriously, hear me out!
If you're building a polysynth voice with a couple of ADSRs and an LFO or
two, plus CVs for velocity, pitch, pitch bend, mod wheel etc coming from
MIDI, it makes much more sense to keep all the modulations in the digital
domain and do the mod matrix there. You can output the final CVs (typically
filter freq, resonance, pan and VCA level) to analogue once they're all
mixed. Otherwise you finish up with many more analogue signals, and you need
switching and probably VCAs for them too. It makes a *lot* more circuit.
Jürgen Michaelis reckoned that fully half the voice board of the Jomox
Sunsyn was given over to the modulation routing.
Otherwise, it _is_ something I've wondered about. Some of the dsPICs include
comparators that will generate an interrupt. These would be ideal for
detecting when the Attack stage had finished and the envelope needed to
switch stage. But it makes more hardware, which isn't usually the direction
I'm trying to go in.
Finally, if the reason for wanting to do it is to avoid doing two additions
and two multiplies in code, you'd be *much* better off either writing it in
C where the maths is easier, or precalculating the results in
Excel/Octave/Perl/PHP/Whatever and sticking a lookup table in. Honestly.
Don't do maths on a 8-bit processor, its not what they're for. ;)
T.
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.872 / Virus Database: 271.1.1/3442 - Release Date: 02/14/11
06:34:00
More information about the Synth-diy
mailing list