A different pitch detection approach.

Started by ~arph, August 29, 2014, 07:37:20 AM

Previous topic - Next topic

~arph

Here is one of my mad ideas again.. This time a different approach of detecting pitch and a possible way of indefinite sustain/note freezing. I am aware that this design will not output pitch perfect notes, but should be pretty close. (if not, use more registers and a higher res. counter) If it works at all that is.
First of all I assume a rectified and filtered input signal (yes the harmonic problem is still here too).

The idea is to count the number of pulses over a fixed time period and use that pulse count to adjust the frequency of an oscillator.
In this design that is accomplished by a schmitt trigger oscillator, but one could also use a carefully chosen resistor at each registers output to create a CV and use that to control a VCO. (probably better)

https://dl.dropboxusercontent.com/u/1849818/ridicule.png

;D  Now shoot me.

R.G.

No ridicule needed. You've just reinvented the frequency locked loop in a simple form. 

The FLL is a variant of the Phase Locked Loop. I don't remember which was invented first. The FLL adjusts an oscillator by the number of cycles (pulses) per unit time, the PLL adjusts an oscillator by the variation in phase (often literally zero crossings) between two waveforms.

The state-machine phase detector in the CD4046 PLL can be thought of as converting to a crude frequency detector when the input frequency is way different from the VCO by outputing a continuous "slew UP!!" or "slew DOWN" signal, only converting to a PWM slewing signal when the input and VCO are closer.

Very similar techniques are used in software in uCs to lock an output to an input frequency; counting time between pulses or pulses per time and calculating a frequency for the output oscillator.
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.

~arph

Cool, never heard of the FLL, makes sense.

So what one needs to add to my circuit is an oscillator and a counter Then adjust the oscillator frequency until the result of both counters is identical.

Google: http://web.mit.edu/Magic/Public/papers/00938354(1).pdf 

At least I was in MIT territory.  8)

Simpler to buy a LM2709 I guess.

Transmogrifox

Quote from: ~arph on August 29, 2014, 09:53:39 AMSimpler to buy a LM2709 I guess.

Not nearly as much fun  ;)
You only use the easy packaged solution when you're trying to make money on the product :icon_evil:.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

stm

You can check the Boss DF-2 (distortion feedbacker) pedal schematic for an example on how to freeze a single note using a PLL.

~arph

Thanks! I think I saw that one recently, it looked interesting. Will have to look up some videos to see what it sounds like