Multiply by an analytic signal to detect the frequency of a sine wave.
When the frequencies match, the sum of the real and imaginary parts will be positive.
References:
- C. Roads, “Computer Music Tutorial” p. 548-549, “Heterodyne Filter Analysis”
- Allan Seago, “Heterodyne Analysis”, http://allanseago.com/Heterodyneanalysis/heteroanalysis.html
- Michael A. Soderstrand, “Adaptive Heterodyne Filters” http://cdn.intechopen.com/pdfs-wm/17796.pdf
download
max-projects on Github: https://github.com/tkzic/max-projects
folder: heterodyne-filter
patch: heterodyne-test3.maxpat