[ ? ] Continuously variable phase LFO?

Started by moosapotamus, December 06, 2008, 02:34:58 PM

Previous topic - Next topic

moosapotamus

Quote from: Eb7+9 on December 09, 2008, 03:07:01 PM
just survived my third motorbike accident ... dang !!

Whoa! :icon_eek: Very glad to still have you with us. Be careful out there, bro.

Well, I am looking for the manual way to go... twisting a pot. But, I think RG is interested in your automatic solution. :wink: :wink:
Actually, I'd be interested in seeing a drawing of that too, if you're up for it. I'm sure you can think of something to use it in, too. :icon_cool:

Thanks
~ Charlie
moosapotamus.net
"I tend to like anything that I think sounds good."

puretube

Quadrature analog multiplication...

= quadrature LFO into VCAs (e.g.: LM13700);

see Bode/Kakehashi...  :icon_wink:

R.G.

Quote from: puretube on December 09, 2008, 07:06:40 PM
Quadrature analog multiplication...
= quadrature LFO into VCAs (e.g.: LM13700);
See first reply.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

puretube

Quote from: R.G. on December 09, 2008, 07:19:17 PM
Quote from: puretube on December 09, 2008, 07:06:40 PM
Quadrature analog multiplication...
= quadrature LFO into VCAs (e.g.: LM13700);
See first reply.

analog, not µC...  :icon_wink:

R.G.

Quote from: puretube on December 09, 2008, 07:33:00 PM
Quote from: R.G. on December 09, 2008, 07:19:17 PM
Quote from: puretube on December 09, 2008, 07:06:40 PM
Quadrature analog multiplication...
= quadrature LFO into VCAs (e.g.: LM13700);
See first reply.
analog, not µC...  :icon_wink:
See first reply.
uC was topic 1, analog trig games mixing quadrature LFOs was topic two.
See first reply.  :icon_wink:
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Eb7+9

#25
Quote from: moosapotamus on December 09, 2008, 03:52:59 PM
I'm sure you can think of something to use it in, too.

I was really hoping you could fill me in what you were gonna do with that Charlie 'cause tell you the truth the only thing I've ever found useful or pleasing for stage or recording use are anti-phase phasors as far as poly phase control is concerned - but that's just in my limited experience ... that's how my stereo-vibes work, two signal paths with cells operating in anti-phase fashion - and not with one side dry like they do in many chorus and stereo phasor circuits ... there the control waves are locked at 180-deg through an inverting circuit - not a big deal to do either ... quadrature oscillators seem a little lame in stereo phasor apps IMO since they won't provide full phase canceling effects in a 2-D setting - and to me the idea of upping that to spatial rotation through a locked quadraphonic system seems like a useless indulgence ...

It just seems to me that if your were to do something sonically pleasing with two sine waves chasing each other it would be best to duplicate the whole circuitry and manually adjust the speed range of one unit to chase and pseudo-track the other ... the lack of perfect tracking would probably make it more interesting than "fixed at other than 180" - but maybe in your app it's different, I'm still thinking in phasor terms ...

About the automatic sine bouncer - it's not a big deal to draw out, all you gotta do is temper the output of your comparators to D-flop circuit levels (5v) - it's easy using a resistor and 5v zener combo and a ground clamp at the output of an op-amp to get compatible interface voltages ... come to think about it, the idea might cause interesting swirl weirdness in a stereo phasor but I'm so into the orgasmic aspects of true symmetric stereo anti-phasing  ... quite profound an experience if I may say so, especially if I'm going through a pair of JCM800's   :icon_redface:

cheers ...

snap

my bet:
Charlie wants to make an "ADA Dancing Hoax"  :icon_smile:
unlike the EHX flanger with its switchable static 90 degrees difference LFO outputs,
he wants to drive one BBD clock with a staticphase LFO
while he wants the second so-called  LFO to drive a second BBD clock.
It is a replica of that first LFO at the same rate but leading or lagging in phase.
When both LFOs approach zero phase difference and one goes from leading to lagging,
the BBD clocks approach zero frequency difference.
When the first one was higher than the second, but now gets lower,
"through zero flanging" is the outcome.

With a single control knob he can manually or pedally cross the zero point.
If he varies that controlresistor, he can cycle the zeros.

Now on with a DUAL R5106/SAD1024/TDA1022/MN3007/MN-/BL-/V3207 convertible PCB !

Eb7+9

#27
Quote from: snap on December 10, 2008, 04:07:39 AM
my bet:
"through zero flanging" is the outcome.
...
With a single control knob he can manually or pedally cross the zero point.
If he varies that control resistor, he can cycle the zeros.

I think I get it ... there's a global delay in all this, right ? ... otherwise Causality would say NO WAY ... you guys want to imitate a delayed tape flanger sorta thing ... is this correct Charlie?

... the idea sounds cool

the first thing that comes to mind - and I'm almost ripping my gut laughing about the possibility of this even remotely working - would be to track your first sine wave with a sine-LFO PLL and then have a way of inserting a controllable amount of phase-offset in the phase detector at the front ... the PLL would produce a sine wave  that tracks plus or minus "some" phase offset - and the variation would be perfectly continuous as opposed to using a PIC/digital approach ... I've never used a PLL to track a really slow frequency, but in theory it should work ... I think ... we would need to double check the range of the 565 for example

I think that would be an approach to try ... could end up being simple too if it did work, like injecting/pulling a small DC current (by OTA ?!) on the charging cap in front of the VCO, or it might be nasty if we have to build a PLL from discretes to introduce the offset ... I think I burnt all my PLL stuff way back ...

now, I hope you guys don't want this right away - I've got a couple of amps to work on thanks to Mr. Hammer who went and told a friend I work on these things ...

moosapotamus

#28
Quote from: snap on December 10, 2008, 04:07:39 AM
my bet:
Charlie wants to make an "ADA Dancing Hoax"  :icon_smile:

Quote from: Eb7+9 on December 10, 2008, 04:26:37 AM
I think I get it ... there's a global delay in all this, right ? ... otherwise Causality would say NO WAY ... you guys want to imitate a delayed tape flanger sorta thing ... is this correct Charlie?

... the idea sounds cool

LOL :D. You guys are way ahead of me. That wasn't what I was thinking, but it does sound like a totally awesome idea... way cooler than what I was thinking.

Let's do it! 8)
Seems like there are already several different approaches to consider.

But in addition, I think I am still interested in my actual original idea, too... the static offset control... A little while ago I built up a combination auto-wah / tremolo on my breadboard and it sounded pretty cool. The auto-wah and tremolo sections were in series so it sounded like a very vocal-like tremolo. With two independent LFOs, one for the auto-wah and the other for the tremolo, depending on where the auto-wah was sweeping when the tremolo opened up, the output was just a snippet of the auto-wah. So it was possible to set the two LFOs each at a different speed such that every time the tremolo opend up, it produced a different filter sweep sound. Then I put an in inverter on one of the LFOs to sync up the auto-wah and tremolo, either in phase or opposite phase. That was kind of cool too, but I thought that if it was possible to have two LFO outputs that were in sync and manually adjust the offset of one of them, instead of the random sound of two independent LFOs running at slightly different speeds, you could precisely control which section of the auto-wah sweep came through each time the tremolo opened up. Seems like you would be able to dial in a repeating up sweep, repeating down sweep, repeating over the top sweep, or repeating under the bottom sweep, for example, just by simply adjusting the static offset of the second LFO. But I couldn't figure out how to do that, so there it is... Maybe not as cool as TZF, but still kinda cool, I think. 8)

So anyway... if a way to do the static offset adjustment could be figured out, couldn't a third LFO simply be added to get the cyclical auto offset sweep? Two birds, one stone.

I'll bet there are some folks who could think up a number of other applications for this, too.

Thanks!
~ Charlie
moosapotamus.net
"I tend to like anything that I think sounds good."

Eb7+9

#29
I think I figured out how this Static Sine-Phase Offset Controller thing can be done - of course a 565 won't work here ...  I see a new form of opto-control design - this time using two opto's to control a Sine wave oscillator (eg. Vibe) and have the LEDs controlled through a V/I circuit that's fed off the smoothing filter that normally follows a std Phase Detector in a PLL ... in effect creating a novel opto-based version of the classic PL-Loop, especially suitable for Low Frequencies - everybody follow ?

It's similar in Loop-System principle to an op-amp wired for NFB except instead of tracking voltage here we're tracking frequency through a front end circuit that can measure frequency/phase differences between an outside sine wave (ref) and one that will track and convert the difference to an output current which charges/discharges a cap which then speeds up or slows down the said tracking (opto-controlled) sine wave oscillator ...

the opto's would be perfect for this type of control - you don't want/need variations in LFO frequency that are that fast anyways ... I would even be tempted to do a phase reading at both up and down zero crossings to reduce tracking jitter ... and what I was saying about injecting a bipolar current at the averaging node would indeed produce the offset we're looking for - normally in charge pump PLL designs designers try to minimize offsets between current sources in the pump as they result in an equivalent DC current, and an equivalent Phase Offset in the tracking - what we're trying to produce and control ... a single pot hooked up to the front of an OTA would provide the ability of setting an arbitrary phase offset by injecting the bipolar output current of the OTA in or out of the averaging cap, bearing in mind that at very low LFO speeds the reaction time of the loop would be slow to respond as well ... in that respect Adjusting the Offset might cause weirdness and loop instability and take some time to recover, especially at really low frequencies ... might be fun/useful at the same time

a new and interesting PLL study case is before us ladies and gents, certainly it would be fun to try getting Vibe oscillators to track like this - we just gotta figure out suitable Phase Detector and Charge Pump circuits ...

btw, what LFO frequency range are we talking here ??


R.G.

From Wikipedia:
QuoteA phase-locked loop or phase lock loop (PLL) is a control system that generates a signal that has a fixed relation to the phase of a "reference" signal.
...
The analog phase detector ...The phase difference at the inputs, when in lock, is near 90 degrees for this type; the exact amount being determined by the loop gain.
...
Digital

The simplest is an XOR gate. It compares well to the analog mixer in that it locks near a 90° phase difference and has a square-wave output at twice the reference frequency.
...
One desirable property of all PLLs is that the reference and feedback clock edges be brought into very close alignment. The average difference in time between the phases of the two signals when the PLL has achieved lock is called the static phase offset (also called the steady-state phase error). The variance between these phases is called tracking jitter. Ideally, the static phase offset should be zero, and the tracking jitter should be as low as possible.
In general, PLL phase detectors of the analog kind lock at 90 degrees +/- the phase error/jitter. Digital detectors lock at 90 degrees for the simple kind, zero degrees for the state machine kind, again +/- the phase error/jitter.

There may be some difficulties in getting a static offset out of a PLL...
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

moosapotamus

Quote from: Eb7+9 on December 11, 2008, 12:45:36 AM
... in that respect Adjusting the Offset might cause weirdness and loop instability and take some time to recover, especially at really low frequencies ... might be fun/useful at the same time

8)

Quote from: Eb7+9 on December 11, 2008, 12:45:36 AM
a new and interesting PLL study case is before us ladies and gents, certainly it would be fun to try getting Vibe oscillators to track like this - we just gotta figure out suitable Phase Detector and Charge Pump circuits ...

btw, what LFO frequency range are we talking here ??

Unfortunately, I am not familiar with PLLs, but it's all sounding like a pretty interesting idea.

LFO frequency range... I guess, whatever is typical for a modulation type effect - phaser, chorus, tremolo, etc... So, what's that... like ~0.1Hz to 50Hz or higher... maybe?

Not sure about any other folks, but I'm not necessarily stuck on it being a perfect sine wave either. Triangle or even square would be cool, too... especially if it simplifies things.

~ Charlie
moosapotamus.net
"I tend to like anything that I think sounds good."

gez

#32
Quote from: moosapotamus on December 11, 2008, 10:41:35 AM
Not sure about any other folks, but I'm not necessarily stuck on it being a perfect sine wave either. Triangle or even square would be cool, too... especially if it simplifies things.

In that case, what I outlined will pretty much do the job (it's simple).  However, square waves (even with the corners rounded off) don't do filters much justice.  For autowah (LFO variety), the best wave form (in my opinion) is +ve going FW rectified sine/inverted 'hyper-triangle'.  The sweep will hang around at the top end for the most part and just dips briefly into the mud.  Other wave forms stay in the lower part of the sweep for an equal amount of time and it sounds muddy...unless you sweep two filters in anti-phase (though those circuits always sound a bit phaser-like to my ears).

Perhaps a quad-oscillator is all that's needed?  I posted a simple quad-triangle design once (accurate, low parts-count and no scope required to set it up).  Link is now inactive (changed provider), but I could post it again if there's any interest.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

moosapotamus

Yeah, gez. I agree... smoother, more sine-like is better for autowah, and hyper-tri would be totally cool.

Quote from: gez on December 11, 2008, 11:31:51 AM
In that case, what I outlined will pretty much do the job (it's simple).

Let's see if I can follow your description. Something like this? ...



I know... I'm a klutz. :icon_redface: What did I miss?

Quote from: gez on December 11, 2008, 11:31:51 AM
Perhaps a quad-oscillator is all that's needed?  I posted a simple quad-triangle design once (accurate, low parts-count and no scope required to set it up).  Link is now inactive (changed provider), but I could post it again if there's any interest.

I would be interested in seeing that.

Thanks
~ Charlie
moosapotamus.net
"I tend to like anything that I think sounds good."

R.G.

Gez, I think you have the right idea. I had a devil of a time with my circuit simulator - it doesn't like mixing digital and analog parts very well - but I think you're right about the single pot sliding phase of the square waves.

I couldn't get the 555 sim to work right, so I pulled a trick out of Lancaster's CMOS cookbook to do the variable duty cycle. A couple of CMOS inverters makes a good variable duty cycle oscillator by splitting the charge and discharge of the integrator cap with a couple of diodes. The result is nearly 0% to nearly 100% duty cycle. A third inverter gives you the reverse. From there, a 4013 gets the necessary pair of variable-phase-offset square waves.

Of course, we could leave it there, but it would be really nice to get triangles or sines, and that's possible from the squares. Using the two square wave outputs with the variable phase relationship, you put a CD4046 on each output and phase lock to the two squares. But instead of using the CD4046's VCO, you use a waveform generator chip like the XR2206 or ICL8038 to get square for the PLL and a simultaneous (and phase locked) sine and triangle from each one. So you wind up with two sines (AND two triangles AND two squares along the way) which can be slid past one another in phase from about 1-2 degrees up to about 358-359 degrees.

The chip tally is: 1x CD4049, 1xCD4013, 2xCD4046, 2xXR2206 plus whatever scaling and control Rs and Cs are needed. It might be possible to do this a different way by replacing the 4046s and 2206s with switched capacitor lowpass filters to just drag the sine out of the output square wave. That looked like a lot of work too.

I beat on PLLs for a while over a number of phase detectors and could never get a sliding phase by introducing an offset into the detected voltage. The loop always servoed itself back to either 90 degrees or 0 degrees depending on the phase detector.

I keep coming back to liking looking up sine values in a table.  :icon_lol:
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

gez

RG, that's really clever using PLLs to clock wave-generator chips.  Now why didn't I think of that?  :icon_smile:

Charlie, I've just come back from babysitting my nephews.  Rather than pay me, their parents ply me with alcohol to persuade me to look after their kids.  As I seldom drink these days, I'm slightly worse for wear.  Will post the quad design tomorrow and the PWM idea over the weekend (want to mull things over for a little while - might be able to get a better range of phase shift with a little thought).  What you've posted is almost there, but has a few mistakes.  Not to worry.

Goodnight Vienna! (hic)
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

R.G.

I also had a run at the straighforward thing - simple phase shift stages. I had thought they'd run out of shift, and two stages was marginal for a 1Hz to a 5Hz range of LFO, but you can indeed get close to 180 degrees over that range with the allpass stages. I used Rf=Rin=10K, Cp=1uF and Rphase =100K.

A quad pot would just about sew that one up  :icon_biggrin: if you could find one. A dual 100K works OK-ish. Probably a variable duty cycle switched-resistor would be best, but then you gotta do a PWM and three or four resistor switches.

The phase shifts as the frequency changes, of course. But at a single frequency it's maybe OK for tinkering.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

gez

#37
Quad Triangle LFO:



ICL7621 chip available at Mouser.  Think very carefully if you sub in something else.  The op-amp needs symmetrical swing (preferably rail-to-rail) and a decent common mode voltage range in order to prevent latch-up.  A further dual op-amp is required to invert the triangles to get a full quad LFO (as shown: only 2 outputs, 90 degrees out-of-phase).  Wire both halves of the extra chip as unity gain inverting amps.

If you can't read anything (snap is from my notebook and was hurriedly scribbled in), get back to me.  Keep caps equal in value.  It's set up to be pretty slow, so you might want to use smaller caps.  The range is pretty decent, if I recall. 
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

gez

#38
Quote from: R.G. on December 11, 2008, 04:24:52 PMI couldn't get the 555 sim to work right, so I pulled a trick out of Lancaster's CMOS cookbook to do the variable duty cycle. A couple of CMOS inverters makes a good variable duty cycle oscillator by splitting the charge and discharge of the integrator cap with a couple of diodes. The result is nearly 0% to nearly 100% duty cycle. A third inverter gives you the reverse. From there, a 4013 gets the necessary pair of variable-phase-offset square waves.

I remembered this afternoon that mucking about with the control pin also causes changes in frequency as well as PWM.  A quick breadboard and a few minutes with the scope confirmed this.  The change is too large to compensate for with the frequency pot.

The old diodes and pot trick you mentioned does give PWM with a wide range, but only at a fixed freqency.  In order to get that control plus a decent range in frequency, you'd have to do something along the lines of your stutter circuit.  It could be done with inverters, but the flip-flops I use (made by ST) are incredibly picky and won't clock unless being driven by a 555 timer or a Schmidt trig input device.

I'll give this some more thought.  There must be a way of doing it with a reasonably low parts count.  Oh yeah, that would be a PIC... :icon_lol:
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

R.G.

Hey, I think you could do the same PWM thing on the duty cycling resistors. Imagine:

(1) a PWM setup using two inverters. This is set to run at, say 32kHz, and give a duty cycle between 1% and 99%. It's fixed frequency and only provides a pwm signal.
(2) a second PWM setup with the other three inverters. This is the low speed one. It's the same as the high speed one except that there are two CD4066 gates in series with the diodes. The 4066 gates are run from the high speed PWM; they are in series with each end of the PWM pot on the low speed setup.

The high speed PWM makes a "resistor multiplier" out of the 4066 gates and the ends of the low speed PWM pot. The high speed PWM pot is then a frequency control - it smoothly varies the apparent resistance of the low speed PWM pot. The output of the low speed PWM is the same as it was, two antiphase, inverse-duty-cycle rectangle waves. These drive the flipflops you mentioned and now you have one-pot variation of speed and one-pot variation of phase angle.

From there, you can PLL a sine/triangle generator to the two outputs and have your single pot, 0-360 phase slide on a sine LFO.

Chip count:
1 - CD4049
1 - CD4066
1 - CD4013

If you want sines, you add
2 - CD 4046 (for the digital phase/frequency detector only, the VCO is not used)
2 - XR2206 VCO sine/triangle chips.

There is the usual assortment of pots, Rs and Cs. It sounds complicated, but in reality it's just stuff out of the CMOS Cookbook. Take it one step at a time and it should just fall into place.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.