How to detect the Frequency of a CV signal [ex. LFO] (>MAX 5)

es_84's icon

Hi all,
for the last days I was trying to figure out how its possible to detect the frequency of a simple cv signal like from an analog LFO. I did a little patch that goes for zero-crossings that works fine as long the LFO is tuned to higher frequencies, I guess 20-50 HZ and up. When it comes to lower freqs the patch stops working. I tried Sigmung~, Fiddle~, Pitch~, quite all of them only work down to 50 Hz, so they seem to face the same problem in a way. Is it possible at all to detect very low frequencies with max msp? Any Ideas how this could work? Maybe the 0-crossing method is not the best for my attempt?

leafcutter's icon

You should make sure your sound card is capable of handling slow audio signals - It should be dc-coupled. Check your input using scope~ to find out if its ok.

Max Patch
Copy patch and select New From Clipboard in Max.

I needed something like this also and found timing the length between transitions to be quite accurate. Here is a zero crossing counter that works well for modular synth signals. Both MSP~ and Gen~ versions.

es_84's icon

Hey Leafcutter,
I am using an RME hdsp 9632 with an ADA8000 device. It appears the ADA8000 is not DC-coupled, so thats why nothing happens below a certain frequency range for sure. Probably the patch works fine then, I just have to find a dc-coupled adat converter. Unfortunately I cant try your patch cause I am still using Max 5, there is no gen~ object in this version. I´ll save it for the future ; ) Thanks for helping me with this!

leafcutter's icon

There is an MSP version in the patch also....

es_84's icon

Cool, didnt see that yet! Well it works somehow, but still I guess there´s some problem with the ADA8000. If the value is true it works down to ~1.3 Hz. Then it goes nuts and spits out higher numbers, interestengly 22050 appears quite often. But also 2205 and other "random" values can appear. Its already an improvement, maybe a better adat device would help. So, now I´m curious if you are able to detect very low frequencies that might have a period of more then 1 minute. Hope to read ya soon!
best
Phil