Audio frequency modulation algorithm I have a digital audio signal (float samples). I need to apply the Vibrato effect to a signal. &quot;Vibrato&quot; is no common term, but it is the same as the frequency modulation.
So, I need to modulate my audio signal by a low-frequency sinusoid. I need to set two parameters for the modulation: &quot;amplitude&quot; and period. In this case, &quot;amplitude&quot; of freq modulation is a maximum shift of signal frequency, for example 10 Hz. Period is just a period of the sinusoid.
So, I need a C/C++ function for such modulation.
The related article, but I cannot quite understand it: https://christianfloisand.wordpress.com/2012/05/01/shaking-it-up-with-vibrato-2/
You need to build a time varying delay, where you can modulate the delay amount over time. 

The peak delay modulation is a function of your maximum desired frequency shift and the modulation frequency. 

This is not trivial since it will require fractional sample delays with some kind of interpolation algorithm. You can't round to the nearest integer delay without "zipper" noise. The best interpolation method depends on the specific requirements of your application (tolerance for noise, input spectrum, MIPS &amp; memory available, etc.)