[sdiy] LFO range as equal tempered pitch modifier
MTG
grant at musictechnologiesgroup.com
Wed Jul 21 20:38:32 CEST 2010
Further on our discussion (ok, your discussions and my learning) of LFO
design, I have been able to construct an LFO with various waveforms over a
range of about 12s period at the bottom to 12Hz freq at the top. Now there
is also obviously depth/range control to consider. For now I'm just using a
MIDI Continuous Controller so I have 127 steps available and a voltage range
anywhere up to ~4.095v max. So if one were to apply the LFO to pitch,
that's a pretty good range (4 octaves or +/-2 octaves depending on how you
look at it).
I have never really played with using an LFO as a "sequencer" before (see:
http://www.scoreforsale.com/html/lfo_drum_video.html ). But it makes sense
to me that one might want to hit thirds, fifths, whatever ... and not just
octaves (or conversely not just narrow warbles). 127 steps is not a huge
resolution to do it in, but I figure if I reduce my overall range somewhat,
I can scale the LFO depth (step size) to hit semitones, half-semitones,
quarter, third or what have you.
Does anyone else do this or see the merit in it? Or is it just a waste of
time?
GB
www.musictechnologiesgroup.com
----- Original Message -----
From: "Tom Wiltshire" <tom at electricdruid.net>
To: "MTG" <grant at musictechnologiesgroup.com>
Cc: <Synth-diy at dropmix.xs4all.nl>
Sent: Sunday, July 04, 2010 9:41 AM
Subject: Re: [sdiy] Hardware/software LFO Designs
On 4 Jul 2010, at 16:40, MTG wrote:
> OK, so I'm thinking of adding an LFO to a microcontroller based project,
> but I'm a total newbie at it. What I'm thinking to start with, is using an
> internal CPU hardware timer (one of those standard 16-bit compare/capture
> thingies) at "X" times the LFO rate to lookup into a table for sine,
> triangle, ramp, etc... then fed to a DAC. The DAC itself is 12-bit, but I
> don't need or want to consume my whole CPU space with lookup tables. The
> CPU has other things to do too. ;-)
>
> The LFO would be sub 1 Hz to maybe 100+ Hz if I can squeeze that out of
> the micro. I suppose for some waveforms it might be easier to calculate
> the LFO value on the fly. Anyone got a feel for how many bits you need to
> make a decent wave without nasty (unintended) distortion? This isn't meant
> to be ultra-hi-fi, at least not as a first pass, but I don't want it to be
> crap either. I could easily fit a few 4-bit, 6-bit, 7-bit or 8-bit lookup
> tables in.
>
> Any project sites you can think of to get my juices going? This one was
> kind of interesting:
>
> Voltage Controlled LFO (VCLFO 9D):
> http://www.electricdruid.com/index.php?page=projects.lfo9
Thanks for the plug, GB!
My experience with the above project was that even a 10-bit output can
produce an output in which digital steps are mostly imperceptible. The
underlying waveform data is all 8-bit, but the final multiplication gives a
16-bit result, of which the top 10-bits are used for the output. So it isn't
even really a true 10-bit output. But mostly you wouldn't know it's digital.
Obviously if you really push it, you can tell - slow sweeps of hi-res
filters and such like show some steeping on certain waveforms.
Your suggested design is slightly different to mine, in that you're talking
about a variable sample rate, whereas I had a fixed sample rate of 19.5KHz.
I'd be interested to know what difference this makes, if any.
The trouble spots are slow waveforms with steep slopes. On my LFO I have a
'Spike' wave which is the worst case. The trouble is that with only 256
entries in the waveform table, when the slope is steep adjacent values in
the table will differ widely. This is not a problem that can be solved by
more vertical resolution. You could use 16-bit values in the table, but
they'd still be very different one from the next (just more accurate!).
Instead, you need to make the wavetable longer so that there are more
intermediate values, and hence smaller steps one to another. In my ADSR code
I used interpolation to fill in extra values, essentially turning a 256
entry wavetable into a 255 segment linear approximation to a curve. The
improvement is significant.
HTH,
Tom
More information about the Synth-diy
mailing list