MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

Faking a Phase-Lock Loop without a Doepfer A196 PLL
MUFF WIGGLER Forum Index -> Modular Synth General Discussion Goto page 1, 2, 3  Next [all]
Author Faking a Phase-Lock Loop without a Doepfer A196 PLL
wsy
I wanted to goof with a PLL, but (being an MU-person - EIGHT AND THREE QUARTER
INCHES! :-) ) just buying a Doepfer A196 isn't in the cards.

So, I thought about it really hard, and you CAN create a phaselock loop with nothing but
stock Synthesizers.com modules. Yes, it works. Quite nicely; in fact, the
sounds are better than what I've heard of on the Doepfer.

There are three essential parts of a PLL: the VCO (that's easy, everybodys got a Q106
VCO, right?), a lowpass (a q105 slew limiter is perfect), and the phase comparator.
The phase comparator is the hard part - and had me stumped for a bit, because the
easiest phase comparator that gives good results is the XOR function, and there's no
XOR function in any of the dotcom modules I have (or for that matter, in any module
whatsoever that I have).

So, I made one - by patching one of the XOR inputs into XIN of a Q116 ring modulator,
and the second XOR intput into the bottom half of a Q125 signal processor, and the
switch thrown to "INVERT" with zero offset , and the output of the bottom of the Q125
into the Q116 ring modulator Y input. The result is an XOR - it's +valued if one and
only one input is positive and the other negative, and -valued otherwise.

Now the patching is clear: patch from the tracking source (any audio signal, but for
testing another VCO works well) to XIN of the ring modulator, patch from the
output of the ring modulator to the variable exponential frequency input of the slaved
Q106 VCO, and patch from the sine wave output of the slave Q106 to the bottom
half input of the Q125 thence from bottom-half output to the Yinput of the Q116 ring
modulator.

Take your audio output (and oscilloscope output) from either the output of the ring
modulator or any of the outputs of the Q106 VCO. Both are sonically interesting but
start with the slaved Q106 sawtooth output.

Set your tracking source to (say) 4' range, center on fine. Set the Q106 slave to 2',
centered on fine, and variable exponential frequency input to zero. Then
increase the variable exponential frequency up from zero and you'll hear the PLL "lock" -
the slave VCO output frequency will abruptly drop to the tracking source's frequency.
Turning the slave Q106's frequency over a significant band will do*nothing* - but you'll
get huge timbral effects as you move the exponential frequency
control through the critical region.

Proof that it's a tracking PLL: turning the tracking-source frequency up or down causes
a 1:1 frequency shift on the output; turning the slave VCO frequency does
NOTHING (over a wide band, at least). The timbral variations are interesting too.

Fun things to do - jack the exponential modulation that goes to the slave VCO through a
slew limiter on the way

Yes, this PLL can do both over and under harmonic generation. Watching on a scope
helps but isn't absolutely necessary.

Why this is better than an A196: (1) you don't need to buy anything, (2) you can use
any oscillator with any style output as the slave, not just the pulse from the A196,
and (3) it's MU and of COURSE any MU synth sounds better than any Eurorack MY ASS IS BLEEDING

Give it a try. :-) (yes, I know it's "better" if it's stateful rather than stateless, but "better"
in the EE sense of the word is not necessarily "more musical")
bouzoukijoe1
wow that is a bit of a tongue twisting patch!
Savage
Wow! This is cool! I gotta try this tonight! applause hyper applause
wsy
Thinking about it, I wasn't understanding why I couldn't just (in the algebraic sense) multiply
the two inputs of the ring modulator by -1 and get the same result... so I could get rid
of the Q125 signal processor and the patch should work just the same but with a
180 degree phase shift from the master oscillator.

But when I tried it- it gave a very different timbre and often didn't "lock on" at all.
I'm still trying to puzzle out why.

- Bill
sduck
Hmmm, this is something I've heard about but never experimented with. Yet. I had to look up the diagram that's on the a196 web page to visualize this.



I've got some CGS logic stuff here - I guess the XOR would work for the phase comparator?
wsy
Yes, XOR should work for the phase comparator.

(and the Doepfer block diagram is the most confusing way to express a PLL
that I have *ever* seen. It's correct; it's just.... so hard to understand that way)

Turns out I mispatched taking out the inverter; it works just fine without it.
I must have done it backwards or something.

- Bill
rockthomas
This is really cool. I like the possibility of making it out of modules because you can experiment with the structure that you can't with a single module. Thanks.
wsy
rockthomas wrote:
This is really cool. I like the possibility of making it out of modules because you can experiment with the structure that you can't with a single module. Thanks.


You're welcome!

Well, the Doepfer isn't bad that way; you have insert points everywhere it matters,
and you do get more than a simple XOR for the phase discriminator (yes, I am thinking
about how to do that better as well; I got a mixer to act like a Schmidt trigger so
it's not impossible, just darn hard)....

But there's no PLL "module" available in MU; given the relative ease of how to make one
just by patching, maybe there's no need for an A196 in MU.

On the other other hand, what would I change? First off, it's better to use a regular
VCO, with all of the nice modulations and alternate waveforms, so don't put that in
the module. Second, a better phase discriminator (something with state, so it can
track wider input frequencies. Third...hmmm... voltage conditioning (gain and threshold)
for the input signals? And maybe a slew limiter? How about an S/H triggered by
exceeding a threshold on the incoming master signal, so the PLL tracks to the
incoming frequency and then can hold the frequency even if the master signal goes
away?

I gotta stop lusting after Serge hardware, that's the truth of the matter.

- Bill
VortexRanger
This is clever and certainly doable in any format - plenty of Euro users who don't have an a196 for example.

The 196 PC2 is an RS Flip Flop - I don't know if there's a flip flop available in MU but euro users could conceivably patch it up with intellijel options. PC3: "more complex digital network." Hmmm, anyone know more details on that?
KnobHell
Bill, why not build some thing using the phase comparator from a cd4046?

Even cooler would be to make it a module with a frequency divider on the same panel.

Len
Navs
Nice one, wsy applause This is what patching is all about - finding creative solutions.

I did something similar with Doepfer's A-172 min/max replacing the phase comparator:

https://www.muffwiggler.com/forum/viewtopic.php?t=53142

If you haven't got any pre-made logic blocks, even the XOR can be faked with a VCA, mixer and polarizing mixer.
odecahedron
i still dont understand it - but i like it!
paperCUT
sduck wrote:
Hmmm, this is something I've heard about but never experimented with. Yet. I had to look up the diagram that's on the a196 web page to visualize this.



I've got some CGS logic stuff here - I guess the XOR would work for the phase comparator?


I don't think this will work if the VCF is not DC coupled, a slew limiter might work better. Gonna test it tonight 8_)
Bob Borries
wsy wrote:
patch from the tracking source (any audio signal, but for
testing another VCO works well) to XIN of the ring modulator, patch from the
output of the ring modulator to the variable exponential frequency input of the slaved
Q106 VCO, and patch from the sine wave output of the slave Q106 to the bottom
half input of the Q125 thence from bottom-half output to the Yinput of the Q116 ring
modulator.


I made a diagram of the circuit, but is it correct?

wsy
Bob Borries wrote:
wsy wrote:
patch from the tracking source (any audio signal, but for
testing another VCO works well) to XIN of the ring modulator, patch from the
output of the ring modulator to the variable exponential frequency input of the slaved
Q106 VCO, and patch from the sine wave output of the slave Q106 to the bottom
half input of the Q125 thence from bottom-half output to the Yinput of the Q116 ring
modulator.


I made a diagram of the circuit, but is it correct?



Yes, that's exactly correct!!!

Something I've been playing with lately: take a third Q106 VCO, set it for a very low
frequency (about 1-2 Hz) and run the pulse output into the slew limiter. Set the slew
limiter to "both" and 2. The result is a PLL that glitches on a very nice beat. It's
not dubstep but it's got good rhythm.

- Bill
KnobHell
But I want a real pll. I'm encouraging you to design a module around a 4046.

It's motherfucking bacon yo
wsy
KnobHell wrote:
But I want a real pll. I'm encouraging you to design a module around a 4046.

It's motherfucking bacon yo


The problem is that I'm currently unconvinced that a "conventional" PLL is actually
musically useful! That's why I'm hacking around with this patch-it-together; the
parts where it sounds good are when the PLL is NOT tracking perfectly, but
rather going into semi-chaotic cycles.

If I had to state it now, a good PLL is *not* musically useful as a slaved oscillator
in a pure modular. If you're processing an external signal, it might be useful; and a
bad (i.e. not tight tracking) PLL might be interesting to hear too.

Let me think on this...

- Bill
wmonk
This is a great example of patching the MU/5U way. One doesn't need exotic stuff to accomplish specific tasks. I just tried it on my DIY modular and it works. The ringmod I used (VC Ringmod designed by Fonik) needed some knob tweaking to get a proper XOR.
Quite a lot of sonic good stuff available. Thanks Bill :-)
KnobHell
Here in an interesting reference that includes a pll with divider. Let's you feed back different harmonics.

Pll
wsy
KnobHell wrote:
Here in an interesting reference that includes a pll with divider. Let's you feed back different harmonics.

Pll


Ahhh- yes. THAT makes some sense. Putting a divider (or two dividers!) into the
PLL would let you resynthesize non-harmonics.

But what would that *really* get you? Different harmonics are just a constant
CV offset away in a 1V/octave synth (IIRC, some of the Paia synths were V/Hz,
so you couldn't go up an octave by adding 1 volt, or up a fifth by adding 0.498 volts.

I was trying to come up with *some* processing that one could insert into the PLL
loop that would make a result that isn't more easily achieved by mucking with the
control voltage, but I haven't been successful yet.

Yet. Other than dynamically changing the slew rate limiter and the slave's servoing
CV injection, at least.

But my theremin arrives today, maybe that will give me an idea. smile

- Bill
VortexRanger
wmonk wrote:
This is a great example of patching the MU/5U way. One doesn't need exotic stuff to accomplish specific tasks.


Loving this thread, and all creative threads like it. But I'm going to have to take exception to the notion that this "way" of patching is in any way exclusive to 5U. Thoughtfulness pays off in any format! w00t
defenestration
thank you very much for sharing! I will definitely be coming back to this thread

curious what the WMD guy would say about 'musically useful PLL' and whatnot - his Synchrodyne design gets my rocks off on a regular basis, but obviously that's not just a PLL (although it's really the heart of the module)
jonah
wsy wrote:
KnobHell wrote:
But I want a real pll. I'm encouraging you to design a module around a 4046.

It's motherfucking bacon yo


The problem is that I'm currently unconvinced that a "conventional" PLL is actually
musically useful! That's why I'm hacking around with this patch-it-together; the
parts where it sounds good are when the PLL is NOT tracking perfectly, but
rather going into semi-chaotic cycles.

If I had to state it now, a good PLL is *not* musically useful as a slaved oscillator
in a pure modular. If you're processing an external signal, it might be useful; and a
bad (i.e. not tight tracking) PLL might be interesting to hear too.

Let me think on this...

- Bill


Speaking about the Doepfer, it's probably more conventionally useful for generating control signals, if you treat it as a pitch follower rather than an audio source.

Sonically, they are either raw or minimally filtered square waves, so it generally requires just as much processing as any other squares to sound musical, I think.

It does interesting things with AM'd or FM'd signals....

Long story short, a PLL sounds great with a fuzz. lol


It's funny how much these go for when you can get all the functionality (and in my opinion more interesting sound) out of a small Doepfer setup. Love that color scheme though. lol
dslocum
Unless I missed something, I very surprised that no one has mentioned adding a frequency divider in the feedback loop to make a frequency multiplier!
wsy
dslocum wrote:
Unless I missed something, I very surprised that no one has mentioned adding a frequency divider in the feedback loop to make a frequency multiplier!


I think it got mentioned in passing a while up.

A (minor) issue is that this is a completely -analog- PLL; with no thresholds other than
zero crossings. Doesn't mean we can't make it work with a divider in each chain, just
means it's a little twitchier (go look up Logan's theorem - it's the poorer cousin to
Fourier's theorem).

Fourier's theorem says "you can recreate ANY wave with sine waves" (*)

Logan's theorem says "you can recreate ANY wave with just knowing the
zero crossings"(**)... and that's what we know in most PLL chips.

The problem is the * and **. For Fourier, it's "any -infinitely long- wave".

For Logan, the problem is "as long as the signal stays in one octave." That's the problem
with a wideband PLL - if the signal is mixed (i.e. the chords from the video above) then
tracking goes to heck and you get basically distorted noise. The "note-y" stuff works
better, because it has a single dominant first harmonic and the PLL can lock to that.

Anyway - Doug: if you want me to come up with the "PLL Core Module" proposal,
say the word and I'll get on the case.

- Bill
MUFF WIGGLER Forum Index -> Modular Synth General Discussion Goto page 1, 2, 3  Next [all]
Page 1 of 3
Powered by phpBB © phpBB Group