[sdiy] LFO range as equal tempered pitch modifier
Tom Wiltshire
tom at electricdruid.net
Wed Jul 21 22:07:35 CEST 2010
You raise an interesting question. Well, interesting to me, at least. But then I've been thinking about the same thing!
It seems to me that there are some basic choices when designing modulation sources. One is: Do I try and build a universal module or specialise each different effect in a single function?
E.g. Do you have separate LFO, Random Mod Gen, and Sequencer designs (for example) or do you combine some or all of those?
A sequencer for LFO use is in many ways closer to a multi-stage envelope than an LFO. But that's where the line starts getting blurred.
What's the best way to include rhythmic elements: Should I have some rhythmically-structured LFO waveforms? (bibiboobibibibibooo!) Should I have a loopable envelope that you can use as a sequencer? Should I include a simple step sequencer?
In short, I don't know the answer, but no, I don't think it's a waste of time. There's many a great sound to be had by using rhythmic sequences or LFO patterns, however you generate 'em.
Regards,
Tom
On 21 Jul 2010, at 19:38, MTG wrote:
> 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