PLL Pitch to Voltage Converter

Started by dj_death, November 13, 2006, 08:07:53 AM

Previous topic - Next topic

dj_death

Does anyone ever tried a pll for pitch to voltage conversion. How it will perform with a pulse converted guitar signal? Did anyone tried one of these application circuits? http://www.national.com/an/AN/AN-210.pdf#page=2 The precision pll claims that has fast response to input frequency changes. How it should perform compared to the Penfold's P2V? This circuit is designed for input frequenies higher than guitar's, can anyone help converting it to handle guitar frequencies?

Meanderthal

 There's been a project floating around that attempts to do exactly what you describe. From all who built it the results are the same: it does not work. I'd like to see a quick and dirty guitar synth also! Some of the applications they describe in that pdf are pretty interesting, and it does sound like it could work, but be aware that this is uncharted territory...
I am not responsible for your imagination.

Ry

Take a look at the Boss DF-2 schematic.  I believe that the 'Fundamental Detector' portion of the circuit does what you're asking, although I'm not sure if it's fast enough for what you're thinking of as pulse detection.


dj_death

Actually i have already read all these guitar synth threads as well as http://www.generalguitargadgets.com/index.php?option=content&task=view&id=175 which uses a pll for pitch tracking. I was wondering if the pll in the pdf (especially the precision pll) is able to perform better as a pitch to voltage converter for guitar comparing to the other approaches such as the mini synth at the link or even the Robert Penfold's Guitar to Synth interface which uses a simpler technique. I built Penfold's Pitch to voltage Converter but i didn't tested it yet (i need some pots). The article states that it has an instant response to frequency changes and very low ripple comparing to other frequency to voltage converters. I should try it sometime but needs some tweaking to much guitar's bandwidth. Does anybody know a reliable commercial or diy guitar unit that performs well in pitch tracking?

John

gez

I once messed around with a crude PLL frequency-to-voltage converter.  It wasn't very linear, but as I said it was crude.  Not so long ago I tried again using a sample and hold technique - use a squared off wave to ramp up a cap from a constant current source and sample the ramp every half cycle (signal controls the switching) - which was instantaneous and pretty linear but range was a little limited.  Those charge pump/tachometer chips are useless as they're sluggish to respond to large changes in frequency.

Whatever approach you take it will work best with a fundamental extractor...lot of work!
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

dj_death

Hmmm sample and hold technique. You mean something like that? http://www.national.com/an/LB/LB-45.pdf#page=1 Do you have a schematic for the circuit you are tested? Did you try it with a guitar?

gez

#7
Something like that, but not that.  If you square up a signal using a comparator type fuzz circuit you have a logic high state for half the cycle of the input frequency and logic low for the other half.  These two states can be used to control switching so that a cap being ramped by by a constant current source is discharged every other half cycle to the one where samples of the ramp at its peaks are held.

If you check out the data sheet for the 398 you'll see a schematic in there that can be copied with the right type of op-amp(s) and used for the sample and hold bit, though I used something a little different:

http://www.datasheetarchive.com/datasheet.php?article=1998479

No schematic I'm afraid, but if I recall I used 4016/4066 for the switching.  For precise linearity you need an accurate constant current source - preferably a dedicated device.  An accurate voltage could be achieved within a single cycle of the input frequency, though range was limited (needed a higher supply).
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

Paul Perry (Frostwave)

Quote from: gez on November 14, 2006, 06:28:32 PM
If you square up a signal using a comparator type fuzz circuit you have a logic high state for half the cycle of the input frequency and logic low for the other half. 

True enough..... and it is also true that with a 'real world' guitar signal (especially as it dies down) you will get mistriggering from harmonics & it will sound shite, no matter what is done after that to turn it into a note. If you are using the pitch to voltage converter output as a source of a control signal it won't be so critical, of course.

puretube

so: you must not allow the signal to die out...

hey: and you can do all you want,
to bend a "neverending" square...

Andre


gez

Quote from: Paul Perry (Frostwave) on November 15, 2006, 04:32:18 AMand it is also true that with a 'real world' guitar signal (especially as it dies down) you will get mistriggering from harmonics & it will sound shite, no matter what is done after that to turn it into a note. If you are using the pitch to voltage converter output as a source of a control signal it won't be so critical, of course.

Granted Paul, but I was assuming the use of a fundamental extractor (as hinted at in one of my previous posts), or at the very least some low-pass filtering, before the comparator.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

StephenGiles

"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".

dj_death

If i understand well Gez you mean a stage with gain and then a comparator with hysterisis in order to convert the guitar signal to pulses. Then a stage that charges a capacitor through a stable current source when the input signal is high and discharges the capacitor when it's low. Then a sample and hold that takes samples of the voltage across the capacitor. Please correct me if i'm correct but i think that i understood something wrong.

This approach gave me an idea. You reming me something that i learned at university. Actually the capacitor that is charged when the input pulse is at high stage and is discharged when the pulse is at low stage is a switching capacitor, a frequency controlled impendance.


The value of the impendance is given by the formula Z = 1 / (2*pi*f*c) where f is the frequency that the switches open and close. Now if we use this impendance to control the gain of an opamp we make a frequency controlled amplifier.


In this circuit there is a non inverting amplifier in which the 100K resistor and 22nF capacitor are selected to give a gain of 1 at 80Hz. When the input frequency increases the gain also increases and output voltage also. I simulated this circuit in Electronics Workbench and it gives very good results here are the results and also a diagram in excel of input frequency vs output voltage.


It looks super linear and it can also accept higher frequencies. I think it needs a filter at the output to reduce ripple though or sample nad hold. But i think that this idea worths a try.How do you think it will perform in a real world guitar signal?

gez

The circuit you've drawn is similar to what I was doing, but not quite.  I've got a sketch somewhere in a notebook of mine.  I'll look for it tonight and take a snap then post if (if I can find the damn thing!).

Re your circuit.  I don't totally understand where you're coming from, but I think you're forming an output voltage proportional to the average voltage across the cap (which will be frequency dependent)?  If so, my only concern would be the constant charging up of the cap from a discharged/semi-discharged state as this would surely create ripple at the output.  Unless I'm missing something?
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

soggybag

It seems like it's very problematic to create Pitch to voltage converter. If you want to convert pitch to voltage you will most often be using this to control a VCO. Why not instead convert guitar pitch to a square wave and run this signal through a filter to wave shape it. This would be very accurate. It would track well and handle chords pretty good, take less parts and would be pretty simple to build.

Tim's Ugly Face outputs an excellent square wave. This signal would be easy to subdivide, or shape with a filter.

I think a better guitar synth could be built using this method.

StephenGiles

Quote from: soggybag on November 15, 2006, 02:00:08 PM
It seems like it's very problematic to create Pitch to voltage converter. If you want to convert pitch to voltage you will most often be using this to control a VCO. Why not instead convert guitar pitch to a square wave and run this signal through a filter to wave shape it. This would be very accurate. It would track well and handle chords pretty good, take less parts and would be pretty simple to build.

Tim's Ugly Face outputs an excellent square wave. This signal would be easy to subdivide, or shape with a filter.

I think a better guitar synth could be built using this method.

Via compression and EH fundamental extractor yes.
"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".

puretube

Quote from: puretube on November 15, 2006, 05:37:28 AM
so: you must not allow the signal to die out...

hey: and you can do all you want,
to bend a "neverending" square...

:icon_wink:

gez

Here's the sketch:



A little primitive, but it worked fine for me.  I didn't (need to) use a flip flop but you'll get more accurate results with it.  Please note, the output voltage decreases with frequency, though it could be re-jigged to do the opposite.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

dj_death

This circuit is just a non inverting dc op amp. The signal that is amplified is the 1V dc source. The gain of the amplifier is given by the formula Av=1+R2/R1. R2 in our case is a switched capacitor network. Here are some links about switched capacitors technology.
http://www.ewh.ieee.org/tc/sensors/Tutorials/makinwa.pdf
http://www.dei.unipd.it/~neviani/did/staicd/allen_c9.pdf
Switched capacitors have a resistance that depends on the capacitor that is used and the frequency rate that charges and discharges. So if this frequency is the guitar signal converted to pulses with a circuit like ugly-face, the resistance will change with the frequency of the signal and so the gain of the op-amp which amplifies the 1V input. Theoritically then we should have a dc output, but the low frequency rate (signal independent) of the switched capacitor gives a choppy dc output.The clock frequency of the switching capacitor should be much higher than the frequency we use, like the nyquist theorem.So a low pass filter should be used or a sample and hold circuit or even some rectification. All these are in theory i don'have an idea how it will perform. This circuit requires a pulse signal so a circuit like ugly face or any must be used to convert it to a pulse signal. So the control voltage will be as accurate as accurate the guitar signal is converted to pulses.

This is a different approach where a voltage divider is formed by a fixed resistor of 220K and a switched capacitor resistor.


The voltage changes to the frequency and then it's buffered by an opamp. Then a low pass filter should be used with a very low cut-off
frequency. I simulated this circuit in workbench using the low pass filter of Robert Penfold's Pitch to Voltage Converter and seems to work nicely. But it's only simulation. I should test it in breadboard sometime to see if it really works and how it performs.Remember all these are thoughts!