costas loop PLL

phase locked loop for accurate frequency tracking (or chaos)

(7 Votes)
1.01 (Updated 4 months ago)
May 07, 2021
Reaktor 6
Effect Other


well, its a special kind of phase locked loop called a costas loop (PLLs are used to track monophonic periodic signals), instead of using flip flops to compare phase difference, it multiplies input by a sine and cosine, filters them both, multiplies them together, and filters again. it's a little more subtle way of doing things, but compared to the more conventional method—that i previously ported to core about a half hour earlier, it seems to work much better. the phase signals are filtered in two places, the second filter, which follows the frequency detection is labeled "costas glide" and works a lot like, you guessed it, a portamento or glide i'd recommend keeping it turned down to keep it following the signal smoothly. the other filtering stage, the phase detection cutoff is more the critical control, it will need adjusting depending on range of input, but you'll get the hang of it. it was tracking notes of my dirty volca keys no problem, within a reasonable range. don't plug the top output labeled "freq" into your audio output, that's not what its for, and i am not liable for you blowing your speakers up if you do, its the detected frequency output, for use for.. you know.... whatever

featuring pristine sine and cosine oscillator made by my friend laureano lopez, a frequency tracker built from the guts of one invented by our illustrious catman dude, which then was improved upon with a lessons learned from the one and only salamander anagram

version 1.01 fixed an obnoxiously obvious bug where the frequency detection output was clipped but the frequency controlling the loop VCO was not, leading to possible situations where the detection would run up against an artificial wall. also of possible note: the placing of the second filter in its current position would make this a 'modified costas loop', as far as i can tell. you can simply read that change as 'more musically interesting'


Catman Dude
4 months ago
Thanks, Andrew! Can't wait to try this out.