Separation of sinusoidal oscillations from the frequency spectrum It is necessary to extract the harmonic signal from the audio spectrum.
That is, from the spectrum of 20 ... 20,000 Hz it is necessary to select only a signal with a frequency of 1,000 Hz, and suppress the rest.
You need to do this on a microcontroller.
As I understand it, you need to take the Fourier transform from the audio signal and multiply the result by a certain window function.
Maybe you can just estimate the frequency of zero crossing? Can it be easier to convolve a signal with some other signal?
The resources of the microcontroller are quite limited, in fact, I do not need the entire spectrum, I need one harmonic component of it. And do all this in real time ...
You don't have to perform a full FFT. Take the definition of DFT:
$$X[k] = \sum_{n=0}^{N-1}x[n]e^{-j\frac{2\pi}{N}kn}$$
What you need is one element of the sequence $X[k]$. For example, suppose the sampling rate is $f_s$, and the signal has a length of $N$, so the frequency resolution is $\Delta f=f_s/N$, and $k$ corresponding to 1000 Hz equals to $1000/\Delta f + 1$. Just do DFT at that discrete frequency $k$.
On the other hand, if you want to convolve your signal with something, use sinusoidal wave of 1000 Hz. We know that a convolution in the time domain equals a multiplication in the frequency domain. The Fourier transform of sine wave is delta function at the specific frequency. So convolving with sine wave can extract the harmonic component.