| Author |
Message |
Uncle Krunkus
Moderator

Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
Posted: Sun May 20, 2012 7:46 am Post subject:
|
 |
|
Ah, very cool.
Even if we have the max multiplier at X8, and choose the cap based on that, can we still take taps off at lower multiples. Like can I incorporate the 5ths idea if my limit was X8, or should I do the X12 circuit? _________________ What makes a space ours, is what we put there, and what we do there. |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Mon May 21, 2012 9:04 am Post subject:
|
 |
|
| Uncle Krunkus wrote: | Ah, very cool.
Even if we have the max multiplier at X8, and choose the cap based on that, can we still take taps off at lower multiples. |
Yes, and that is exactly what I did with my unit - that's where the 7 outputs come from.
| Uncle Krunkus wrote: | | Like can I incorporate the 5ths idea if my limit was X8, or should I do the X12 circuit? |
Since the number 8 has only 2 as a factor and does not include 3, perfect fifths are not possible.
A fifth (a perfect fifth) above note X is a note that has a frequency 3/2 of that of note X. Due to the 3 in the numerator, we would require putting that into the formula. So yes, X12 could be used to get 5ths and octaves. (quite literally, only x6 would be required for fifths and octaves. x3 would do only 5ths of the fundamental fed to the input of the circuit). One interesting thing (to me) was that with X12, (which is made up of factors 2 and 3 as 2 * 2 * 3) you can get out of the PLL x2, x4 and x8 for octaves and x1.5, x3, x6 and x12 for perfect fifths. The x1.5 is possible by simply dividing the x3 output by 2. That's what all that digital logic is for in my original design.
It's probably good to note that the lower the multiplication, the more "spritely" the PLL can respond to input frequency changes. I have not found musical issues, however, with x12. I did not experiment with higher multipliers, mainly because as a musical instrument, I was happy with x12. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
JingleJoe

Joined: Nov 10, 2011 Posts: 878 Location: Lancashire, England
Audio files: 14
|
Posted: Tue May 22, 2012 12:51 pm Post subject:
|
 |
|
Excellent ideas chaps I am thoroughly enjoying reading about this PLL multiplier thanks for sharing it!
I was also thiking about "reaction time" of the PLL I did some calculations and it seems like it needs atleast half a second to really respond to some of the frequencies I want it to maybe I got something wrong.... wait, yes I did
It only needs about 150 ms to respond to 55Hz (A two octaves below middle C I think) and I suppose 300ms to respond to the A below that.
These numbers are coming from the frequency division required in the feedback e.g. for frequency multiplication of 8: 55/8=6.875 so the time period is equal to 1/6.875=0.145, or 145ms.
This does not take into account the time it takes for the filter to respond. _________________ As a mad scientist I am ruled by the dictum of science: "I could be wrong about this but lets find out"
Green Dungeon Alchemist Laboratories |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Tue May 22, 2012 1:08 pm Post subject:
|
 |
|
Yes, there is a delay. I don't know what it is exactly, a lot depends on the filter. I remember the discussion of this on SDIY email list forum when I started this. Lots of warnings - oh watch out for the delay. I might add that the warnings turned out to have come from people who had never used a PLL for a musical application.
From my empirical data of actually using it - it was a lot of nay saying for nothing. As I said - there is a delay. Is it enough to make it useless? Not by a long shot. And it does depend on the input frequency.
The delay manifests as a sort of short portamento, but from my perception, it was mainly contained within what I would call the attack portion of a note. It could be made longer intentionally by using a loop filter with lower Fc which turned it into a portamento effect. Unfortunately, I don't have a recording I can find and post (and the synth is down at the moment), but as I recall, it was such a short delay that it was musically insignificant.
The divide ratio inside the loop does exacerbate the delay, but again, I never found it to be a problem for making music.
In my opinion, this thing works well enough to try it. I would encourage anyone interested in using a PLL for music to breadboard it up and have fun. Last edited by JovianPyx on Tue May 22, 2012 4:50 pm; edited 2 times in total |
|
|
Back to top
|
|
 |
Uncle Krunkus
Moderator

Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
Posted: Tue May 22, 2012 2:52 pm Post subject:
|
 |
|
I have never heard it, but I'm quite confident that a short portamento at the start would make the use I intend it for an even better waveshaper, and therefore very "musical". I don't find the point in going for absolute purity in oscillators. Purity isn't that interesting. Everything down the track from the oscillators will effect the purity of the wave, and I'm glad of it. _________________ What makes a space ours, is what we put there, and what we do there. |
|
|
Back to top
|
|
 |
Uncle Krunkus
Moderator

Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
Posted: Tue May 22, 2012 4:06 pm Post subject:
|
 |
|
I was just about to put a 4046 on the breadboard, and I suddenly realised that what I want is not X8. It's X2, 8 times. In other words, 8 octaves up! Or X256.
What are the chances that is gonna get up and running?!?
Well, it's going on the breadboard this morning, so we'll soon see what we can do.  _________________ What makes a space ours, is what we put there, and what we do there. |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Tue May 22, 2012 4:52 pm Post subject:
|
 |
|
hmm. not sure why my last reply didn't make it...
Anyway, as far as 256x frequency multiplication - the 4046 IC will do it - whether it is useful will be entirely decided by the "perpetrator"
My advice - break out the solderless breadboard and try it. All you will waste (since you own the breadboard and the ICs) is a bit of time that you can call an autodidactic education  _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
Last edited by JovianPyx on Tue May 22, 2012 4:55 pm; edited 2 times in total |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Tue May 22, 2012 4:53 pm Post subject:
|
 |
|
Here is what I tried to post before which I hope answers some other questions.... EDIT ADD: Oh - and this is most likely a local network problem and NOT wonderful electro-music.com
------------------------------------------------------------------------------------
Yes, there is a delay. I don't know what it is exactly, a lot depends on the filter. I remember the discussion of this on SDIY email list forum when I started this. Lots of warnings - oh watch out for the delay. I might add that the warnings turned out to have come from people who had never used a PLL for a musical application.
From my empirical data of actually using it - it was a lot of nay saying for nothing. As I said - there is a delay. Is it enough to make it useless? Not by a long shot. And it does depend on the input frequency.
The delay manifests as a sort of short portamento, but from my perception, it was mainly contained within what I would call the attack portion of a note. It could be made longer intentionally by using a loop filter with lower Fc which turned it into a portamento effect. Unfortunately, I don't have a recording I can find and post (and the synth is down at the moment), but as I recall, it was such a short delay that it was musically insignificant.
The divide ratio inside the loop does exacerbate the delay, but again, I never found it to be a problem for making music.
In my opinion, this thing works well enough to try it. I would encourage anyone interested in using a PLL for music to breadboard it up and have fun.
Bottom line is that I would use as small a multiplication factor as is needed since it does "slow" the system down. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
Uncle Krunkus
Moderator

Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
Posted: Tue May 22, 2012 5:25 pm Post subject:
|
 |
|
Well,
X128 would still yield interesting results, even X64 would be worth trying.
I'll give it a go, and keep you posted on the results. _________________ What makes a space ours, is what we put there, and what we do there. |
|
|
Back to top
|
|
 |
J3RK
Joined: Jun 05, 2006 Posts: 123 Location: Seattle
|
Posted: Thu May 24, 2012 10:33 am Post subject:
|
 |
|
Thanks for all of the information you posted Scott! I've been struggling with PLL concepts and basic use of the 4046 for this sort of thing for some time, and this just about clears it all up for me!
I'm at work, so couldn't go through this with the fine-toothed comb that I will later, but if I just want to make one (external to the 4046) VCO track another, (within reason) where (which pin?) do I take the error voltage from to control/adjust the second VCO?
I'm sure with a combination of your info and the many datasheets I have collected I'll eventually figure it out, but thought I'd ask anyway.
I think to keep things simple initially, I'd take the square/pulse output straight from the comparator after the VCO core, and put it into PC1 on the 4046. This way, it's got something consistent to work with. I'm thinking of this in the context of a dual-VCO with a simple "lock" function. (maybe add a pot into the filter to sweep the range a bit)
Nice thread! |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Thu May 24, 2012 11:02 am Post subject:
|
 |
|
| J3RK wrote: | | I'm at work, so couldn't go through this with the fine-toothed comb that I will later, but if I just want to make one (external to the 4046) VCO track another, (within reason) where (which pin?) do I take the error voltage from to control/adjust the second VCO? |
If the 4046 is wired as a PLL, the loop filter output is connected to pin 9 (VCO input). That voltage is internally "followed" (buffered) and presented at pin 10 (Demod output). Pin 10 would be the appropriate place to get this voltage since doing so will not load the loop filter (loading the loop filter will change it's characteristics).
But there is at least one caveat with this: the 4046 VCO is a "linear" VCO. Linear is also called volts/Hz (not 1volt/oct). That means that the voltage at pin 10 is useless when applied to the more popular "expo" (or 1volt/oct) VCO. If the external VCO is linear (such as those in a Fatman), then it should work. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
J3RK
Joined: Jun 05, 2006 Posts: 123 Location: Seattle
|
Posted: Thu May 24, 2012 11:17 am Post subject:
|
 |
|
Thanks!
So, if the primary (the VCO being tracked,) is exponentially controlled, could one then take the error voltage, and either send it through the linear FM of the secondary VCO, or inject it past the exp circuitry? Or would this still not have the desired effect? It will take a minute for this topology to sort itself out in my head.  |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Thu May 24, 2012 12:07 pm Post subject:
|
 |
|
| J3RK wrote: | Thanks!
So, if the primary (the VCO being tracked,) is exponentially controlled, could one then take the error voltage, and either send it through the linear FM of the secondary VCO, or inject it past the exp circuitry? |
The CV type of the VCO being tracked doesn't matter because the PLL never sees it. The PLL generates it's own (linear) CV. The PLL sees only the VCO's output voltage. In fact, the signal you put into the PLL input doesn't need to be a VCO at all.
But perhaps I don't understand what you want to do - if what you want to do is to track one VCO against another, the easiest way to do that is just drive both VCOs with the same CV and then no PLL is needed at all. This assumes that the VCOs used have quite linear cores. Musically, that means both VCOs will respond identically (within the confines of the core linearity). Portamento can be added using a PLL, but that's more work than is required also, since all it takes is a capacitor and a pot to make portamento on a VCO (many/most already have a portamento or "glide" control).
The main reason I used a PLL was for frequency multiplication that provided several frequency multiplied outputs simultaneously. This multiplication is quite close to perfect and requires no tuning. An octave higher (x2) is perfectly phase aligned with the input and with other PLL multiplier outputs of the same circuit. So it's self tuning and tracking is near perfect.
Often, an expo VCO has a linear FM input. As long as the FM input does not have a DC blocking capacitor, it should work to control it with the PLL's demodulator output on pin 10.
It is worth noting also that you can achieve frequency multiplication without a PLL, though it would require tuning to set it up. If you have expo VCOs, you can send N volts to a CV input and then N+1.00000 volts to another VCO. In this case, the VCOs will operate one octave apart. Tuning may be required here, the 1.00000 volts will probably come from a pot. Other intervals such as fifth can also be accomplished this way, but will require tuning to get them "perfect". Also - sometimes slight mistuning is desirable to get a fatter sound. A similar technique can be used with linear VCOs, for an octave above, one VCO should receive a CV that is exactly twice the voltage of the other VCO - but again, tuning is required.
Musically, the idea I had was this: Given a waveform like sawtooth, there will be strong harmonics at 2x and 3x the fundamental. If a PLL is used to track that VCO at 1.5x it's frequency, the perfect fifth above the fundamental is strengthened. Many chords used in western music use fifths quite liberally. These fifths are not perfect though, so when those imperfect fifths are mixed with the PLL's perfect fifths, there is a bit of beating which tends to fatten the sound without giving an out-of-tune sound. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
J3RK
Joined: Jun 05, 2006 Posts: 123 Location: Seattle
|
Posted: Thu May 24, 2012 1:00 pm Post subject:
|
 |
|
Very helpful, thanks!
I actually do want to implement some form of frequency offset (probably in 3rds, 5ths, and octaves,) much the way you do with your circuit. To start though, I want to build something on a simple level, that I can see function, and then expand from there. I'm basically thinking of different way of combining two VCOs in a dual configuration that add a bit of variety. Right now, I'm using a tri-core (basically interpolated between a 258 and VCO-1 core.) I've built a crossfader that fades between the triangle output and pulse, and then it also has PWM. So you can fade the varying pulse with the triangle, and get some interesting animation and in-between waveforms.
Combining two of these, with a PLL, and some internal cross modulation routings, should make a dual version fairly versatile. It may not actually be the best way to achieve it, but its something that was already somewhat intriguing to me, so this is a great start. Having them differ in frequency while locked in phase would be fairly useful I think.
I agree, that an identical CV signal is the best way to make two VCOs track together. And possibly just tune, and/or have a voltage offset switch could be another simple way of getting multiples.
Lots of good information to absorb though, thanks! |
|
|
Back to top
|
|
 |
droffset

Joined: Feb 02, 2009 Posts: 515 Location: London area
Audio files: 2
|
Posted: Tue Aug 21, 2012 11:41 pm Post subject:
|
 |
|
So I've been sitting around for the past week thinking about how there must be a way to get an octave or two up on a vocalsynth idea I'm playing with.
And then I found your 4046 multiplier article.
And then I found this thread, where it's all being discussed and explained.
Pretty cool. _________________ ==================
Check out the FREE Intro to Lunettas Document
https://docs.google.com/document/d/1V9qerry_PsXTZqt_UDx7C-wcuMe_6_gyy6M_MyAgQoA/edit?usp=sharing
Edit: Spelling mistakes. |
|
|
Back to top
|
|
 |
The Real MC
Joined: Jun 20, 2008 Posts: 62 Location: Painted Post NY
|
Posted: Thu Aug 23, 2012 10:07 am Post subject:
|
 |
|
| I know I'm late to the party, but the old Eventide H9xx pitch shifters are based around a PLL multiplier core. |
|
|
Back to top
|
|
 |
Smada
Joined: Feb 18, 2016 Posts: 5 Location: Smada
|
Posted: Thu Feb 18, 2016 2:58 pm Post subject:
|
 |
|
| Hi guys, sorry to drag up an old thread but I have been trawling through google for information on audio range frequency doublers and stumbled upon this thread - which seems to offer exactly what I want. However, I have one question - is the PLL frequency doubling circuit only suitable for square wave inputs or will it work with a sine wave input too? The iniital thread post seemed to be focused on square waves so I wanted to be sure before I build the circuit. Thanks for any help you can offer! |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Thu Feb 18, 2016 3:11 pm Post subject:
|
 |
|
| Smada wrote: | | Hi guys, sorry to drag up an old thread but I have been trawling through google for information on audio range frequency doublers and stumbled upon this thread - which seems to offer exactly what I want. However, I have one question - is the PLL frequency doubling circuit only suitable for square wave inputs or will it work with a sine wave input too? The iniital thread post seemed to be focused on square waves so I wanted to be sure before I build the circuit. Thanks for any help you can offer! |
You can use sine or tri or saw or pulse waves with a 4046 PLL with a caveat or two. First, the input to the 4046 PLL must be rail to rail with respect to the 4046. Second, the waveform should be one in which there are no more than 2 "zero crossings" per cycle. I put "zero crossings" in quotes because you might be using rails of say 0 volts and 15 volts. These "zero crossings" are virtual where the "zero" point is halfway between the 4046 Vdd and Vss. What this means is that you can't expect complex audio signals like vocals or guitar to work properly.
My suggestion as always - try it! Build up a 4046 on breadboard and pipe in your signal and see if the PLL locks. Once you have that going then stick a toggle flipflop (like a D flipflop with ~Q piped back to the D input) in the PLL's feedback loop. That should then cause the PLL output signal to be an octave higher than the input signal. Note that the PLL output will always be a square wave. Some fiddling with the capacitor may be needed to get the range of the PLL into good territory. My circuit worked over at least 5 octaves (probably more, but it's been some years since I played with it).
Have fun with it!
EDIT ADD: I just had a look at the datasheet and I can't find if the signal input (pin 14) has a schmitt trigger circuit or not. Using Phase Comparator II, the PLL locks to one edge of the input signal. Phase Comparator I requires a 50% duty cycle waveform to work best, but will also attempt to lock onto harmonics of the input waveform. This is why I suggest using Phase Comparator II for frequency multiplication. Using a schmitt trigger IC like a gate from a 40106 will ensure a nice edge for the Phase Comparator to lock to, so I'd suggest buffering your signal with a schmitt trigger. This will also ensure that the input sees a nice rail to rail input. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
Last edited by JovianPyx on Thu Feb 18, 2016 4:22 pm; edited 1 time in total |
|
|
Back to top
|
|
 |
Smada
Joined: Feb 18, 2016 Posts: 5 Location: Smada
|
Posted: Thu Feb 18, 2016 3:24 pm Post subject:
|
 |
|
| Thanks for the quick reply mate, I will hit up the lab and let you know how it goes! |
|
|
Back to top
|
|
 |
Grumble

Joined: Nov 23, 2015 Posts: 1320 Location: Netherlands
Audio files: 30
|
Posted: Fri Feb 19, 2016 3:23 am Post subject:
|
 |
|
I'm thinking about making a triangle waveform into a saw wave, this is because the parts I'm using for wave forms are only capable in making sine, triangle and squares.
First I invert the signal, and make two top detectors which make a small puls at the top of the triangle and a puls at the bottom of the triangle.
This will be fed into a set-reset flipflop, which in its turn opens /closes a cmos switch to conduct the slopes from the original signal and than from the inverted signal.
So effectively you end up with a sawtooth signal of twice the frequency of the original triangle wave. |
|
|
Back to top
|
|
 |
thermionicjunky
Joined: Dec 07, 2006 Posts: 90 Location: san francisco
|
|
|
Back to top
|
|
 |
Grumble

Joined: Nov 23, 2015 Posts: 1320 Location: Netherlands
Audio files: 30
|
Posted: Sat Feb 20, 2016 7:16 am Post subject:
|
 |
|
For me diy means that I like to "invent" my own wheel.
The fun for me is thinking about what I want and how to do it, not copying someone else's work. |
|
|
Back to top
|
|
 |
elmegil

Joined: Mar 20, 2012 Posts: 2179 Location: Chicago
Audio files: 16
|
Posted: Sat Feb 20, 2016 7:39 am Post subject:
|
 |
|
| On the other hand, looking through and understanding someone else's work (and I'd particularly cite Thomas' for this sort of thing) helps understand the principles that then let you invent your own wheel.... |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sat Feb 20, 2016 8:11 am Post subject:
|
 |
|
My only point was how to make a 4046 behave and properly track an external input. Certain signal conditioning is required, such as the rail to rail input requirement (to get a clean output signal). Of course - you can do whatever you want as long as it gets the results you want.
I too have played with making other waveforms from the 4046 output, it's not really that hard and had actually been solved well before TH presented his circuit (not to take anything away from TH BTW - he does great stuff). The thing to understand from what TH (and others before him) had done is that the capacitor is in a sort of floating "flying capacitor" circuit (neither side is grounded) and that the way to get a signal from the cap (without screwing up the 4046 operation) is to use very high input impedance amplifiers (FET input opamps) - which is apparent in the TH circuit.
Other things to be aware of with respect to frequency multiplication (to put the thread back on it's title) are the loop filter and not getting carried away with too much multiplication. The loop filter needs to account for the fact that a larger divider in the PLL loop will slow the response of the PLL because it takes more input cycles before an edge change inside the PLL occurs due to the divider. The circuit cannot be expected to track as quickly with a divider than it does without. One easy thing to do is to make the loop filter adjustable. It's a simple RC filter (or can be) so it's very easy to adjust. I had very good success using a divide by 12 circuit. "Good success" meaning there was no discernible portamento or delay in the PLL catching up to the input signal. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
Grumble

Joined: Nov 23, 2015 Posts: 1320 Location: Netherlands
Audio files: 30
|
Posted: Sat Feb 20, 2016 9:23 am Post subject:
|
 |
|
| elmegil wrote: | | On the other hand, looking through and understanding someone else's work (and I'd particularly cite Thomas' for this sort of thing) helps understand the principles that then let you invent your own wheel.... |
I'm sorry, did not intend to offend anybody!
Everyone should practice this hobby as he or she likes most!
Alas, I don't play keyboard yet still I'm working on the design of my second synth  |
|
|
Back to top
|
|
 |
|