# How to retune this mixture of 2 close-frequency sinusoids?

I have a signal which is a mixture of 2 close-frequency sinusoids, something like 1320 Hz and 1325 Hz, with an amplitude envelope which is typical for a musical instrument (ADSR).

$$s(t) = a_1(t) \sin(b_1 t + c_1) + a_2(t) \sin(b_2 t + c_2) + \text{noise}(t)$$

with the frequencies $$b1$$ and $$b2$$ very close from each other. Along time, $$b1$$ and $$b2$$ can slightly vary as well.

The fact the 2 sinusoids are so close in frequency makes a "wawawa" tremolo effect.

Question: How to remove this effect and keep a stable signal without "tremolo" (but keep the original ADSR envelope)?

A 44.1Khz 16-bit stereo .WAV audio file example is worth a long text: example here.

• That effect is called "beating" and is unavoidable when there are two close-in-frequency sinusoids.
– Peter K.
Commented Sep 7, 2023 at 19:19
• Yes @PeterK. that's right (that's what piano tuners use to tune strings), result of sin (A) + sin (B) = 2 sin (½ (A + B)) cos (½ (A – B)). Is there a way to "average" the signal and remove the beating ? Commented Sep 7, 2023 at 19:36
• Maybe by calculating the envelope, and normalize the envelope ? or some sort of STFT averaging ? I wish there could be a way to remove the beating :) Even if it includes modelling + resynthesis Commented Sep 7, 2023 at 19:37
• It seems to me that somehow you gotta separate the envelope (which has both your ADSR and your beating) from the sinusoid that is at the mean frequency. Then low-pass filter the envelope (to remove the beating but keep the ADSR) and reapply the envelope to the sinusoid. Commented Sep 7, 2023 at 22:46
• @robertbristow-johnson Thanks! This could work but I fear it would kill the little imperfections of the sound that make it lively (phase, stereo effects, etc.) Do you see a way without resynthesis of a envelope-modulated single sinusoid? Commented Sep 7, 2023 at 23:29