0
$\begingroup$

I have a digital audio signal (float samples). I need to apply the Vibrato effect to a signal. "Vibrato" 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: "amplitude" and period. In this case, "amplitude" 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/

$\endgroup$
3
  • $\begingroup$ I found this : stackoverflow.com/questions/8611722/… $\endgroup$
    – MaximGi
    Mar 3, 2016 at 12:39
  • $\begingroup$ @MaximGi, as I understand, FM synthesis is a different task $\endgroup$
    – Image_dsp
    Mar 3, 2016 at 12:56
  • $\begingroup$ Yes, I was giving this link to provide some hints, because doing an (digital) FM modulation on a raw signal is not easy in terms of coding $\endgroup$
    – MaximGi
    Mar 3, 2016 at 13:04

2 Answers 2

6
$\begingroup$

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 & memory available, etc.)

$\endgroup$
2
1
$\begingroup$

After much searching and asking questions, I have written my own realization for the vibrato effect: https://github.com/Bershov/Vibrato-effect. The code is not hard for understanding and works fine. In fact, the vibrato is a kind of frequency modulation. Its key concepts: variable delay, low-frequency oscillation and intelpolation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.