I saw someone on another forum ask for advice on how to implement a real PLL using Max/MSP. It seemed like a great task for gen~, so I put this patch together. The gen~ object creates a square wave internally and tries to lock onto the signal from a cycle~ object.
PLLs can be a tricky subject, but playing with the patch doesn't require understanding the math. I tried to add comments about how tuning controls affect the behavior.