Sv: [sdiy] Digital VCO update
Eric Brombaugh
ebrombaugh at earthlink.net
Mon May 1 00:30:35 CEST 2006
Michael Bacich wrote:
> Are you talking about frequency jitter, or some other kind of stability?
Absolute frequency accuracy with respect to an external source. Jitter
doesn't seem to be a problem.
> In fact, with 1v.octave response, it's possible to do very musically
> useful things
Good enough reason to make it 1V/Oct. I've already got that part figured
out.
> Absolutely! This will allow rhythmically synced LFO effects
Sync is definitely in.
> Obviously, very slow rates are always fun, but I worry that the
> waveform stepping may start to become unbearable at extreme settings
> -- only some testing will tell, right?
Yes. The PSoC DAC is 9-bits or better, which puts the stepping frequency
down at least 54dB. If the VCO output is used as audio then I can hear
this in the sinewave at the lowest frequencies as a quiet buzz. I'm not
certain how much this would degrade AM and FM use of an LFO though.
Empirical evidence is required.
> I think you were claiming that your current design had about a ten
> octave range, right? (20KHz to 20Hz). Does this wide range come at
> any expense of frequency control resolution? Or to put it another
> way, would you be able to get better control resolution if you were to
> cut the overall range, for instance, in half?
The current scheme gives me 256 steps/octave, but the NCO that actually
generates the waveform is has 0.0037Hz resolution across its range. For
an LFO, there would still be 256 unique frequencies possible in each
octave, just the range would be lower and I'd run the NCO at a lower
sample rate, so the frequency resolution of each step would be finer.
I could increase the steps/octave at the expense of flash memory since I
use a lookup table to compute the powers of 2. The main impediment is
that the PSoC CPU is 8-bit wide, so there's a hefty time penalty for
handling wider data than that.
> I don't think any kind of output filtering is going to be very useful
> on this.
I've been messing around with the filter this afternoon, and I'm here to
tell you it helps a lot. Especially on killing the aliases in the
waveforms with sharp transitions. One interesting thing is to generate
square waves by clipping the filtered sine. Taking a square directly
from the DAC creates lots of edge jitter, but the filtered sine has much
more consistent zero crossings, so there's much less edge jitter and
consequently the aliases are much better.
For an LFO sampled at 23kHz with a top rate of 200 Hz, I'd be tempted to
bring the filter in to less than 1kHz, but that would probably put way
too much slope on the sawtooth and square waveforms. 5kHz is probably
about right.
> Speaking of which -- how sharp and clean are those sawtooth
> transitions? Could they reliably be used as input for a typical
> sawtooth > comparator Pulse Width Modulation circuit?
The transitions are clean, but there's no avoiding the +/- 1/2 sample
jitter in that edge. For a 23kHz sample rate, that means you've got +/-
21 microseconds uncertainty in where the edge is. For PWM, you'd be much
better off using the triangle waveform to eliminate the jitter because
it doesn't have the sharp edge that's sensitive to the sample rate. Of
course, then you can't lock one edge of the resulting pulse to a fixed
time cycle since both edges expand out from the center.
> Getting back to your question, "Frequency range?", if you're talking
> about ten octaves of range, then 0.2 Hz to 200 Hz would probably work
> for me, and would probably be similar to the kind of range we see on
> LFO's in most modern synths (Korg Triton, etc.).
That's very do-able. I'd probably drop the sampling rate to 23kHz. That
would give me 42 microseconds to mess around in the sample-rate ISR to
do things like long table lookups and fancy dithering schemes.
> If, for some technical reasons, you can't have different ranges for
> your different waveforms, and must choose just one range, then
> definitely use the +/- 5V range.
Well, the PSoC is a 0V/5V device and it's DAC output is in that range.
In the current system I boost gain by 2x and add an offset to make it
+/-5V. That offset could come from a pot so you can dial in anything
between +/-5V to 0/10V.
> I'm a traditionalist, I guess. Sine, Triangle, Square, Saw Up, Saw Down.
Sounds reasonable.
> 1. A sync output pulse would be very handy. One pulse per cycle.
> Or better yet, selectable numbers of pulses per cycle (1, 2, 4, 6, 8,
> 12, etc.)
1 pulse/cycle is easy. More than that takes a bit of extra work.
> 2. MIDI sync -- sync to external MIDI clock.. Yeah, I know I'm
> pushing it here.
That will have to be in the distant future. There's a lot for me to
learn about MIDI, sync, etc before I can even consider how that would be
implemented.
Thanks for all the suggestions and background. Very helpful.
Eric
More information about the Synth-diy
mailing list