0

I want a LFO to be a 6Hz sine wave that will modify the amplitude of the original signal by +/- 2db.

[y, Fs] = wavread('input.wav');
t = 0:1/Fs:(length(y)-1)/Fs;
y1 = y .* 1.584893.*sin(2*pi*6*t);
wavwrite(y1,Fs,'output.wav');

is that going to do what is required? Cuz after i listened to the output signal it sounds deformed.

1 Answers1

2

In order to apply sine wave amplitude modulation to a signal you need to multiply the signal by

1 + Am * sin(2 * pi * Fm * t)

where Am is the amplitude of the modulation (0.258925 in your case, for +/- 2 dB) and Fm is the modulating frequency (6 Hz in your case).

So your expression should be:

y1 = y .* (1 + 0.258925 .* sin(2 * pi * 6 * t));
Paul R
  • 195,989
  • 32
  • 353
  • 519