Welcome to the Parallax Discussion Forums, sign-up to participate.
PUB start(inp_pin, fb_pin, freq_count, freq_addr, count_addr, sampling_rate, goertzel_rate, goertzel_n) | i
'' Sets up the Goertzel analyzer:
'' inp_pin is the sigma-delta audio input.
'' fb_pin is the sigma-delta feedback pin.
'' freq_count is the number of frequencies being analyzed.
'' freq_addr points to an array of longs containing the frequencies being analyzed.
'' [b][color=red]During operation this array will be continuously refreshed with the Goertzel power coefficients
'' for the frequencies selected.[/color][/b]
'' count_addr points to a long which will be incremented after each result is posted at freq_addr.
'' This can be used to synchronize the reading of results.
'' sampling_rate is the frequency (Hz) at which the ADC is sampled.
'' goertzel rate is the number of times per second to report results.
'' goertzel_n is the number of samples required to obtain each result. The higher this number is, the
'' narrower the passband of the consequent filters.
if [b][color=red](maxcorr => 75 or maxcorr * 100 / seccorr > 175 - maxcorr and maxcorr => 40)[/color][/b]
tv.str(string("You said, ", 34))
tv.str(string("Say again, please."))