I am feeding the samples of pure sin wave to the audio DAC, I would like to create an echo effect. What I am not sure is how to go about it. I was thinking about superimposing the the current buffer that I am feeding with the delayed version of it with some decaying factor but that does not seem to help at all. I am using FIFO buffer to fill up with the next sample. Is there any standard approach in creating a good echo effect? How long the delay should be(how many samples)?

  • $\begingroup$ A pure echo of a continuous sine wave is audibly undetectable as such. $\endgroup$
    – hotpaw2
    Dec 2, 2012 at 6:44
  • $\begingroup$ What about if it is a sinusoid with some added gaussian white noise? Would it still be undetectable? $\endgroup$ Dec 2, 2012 at 9:33
  • $\begingroup$ Is the pitch/amplitude of your sine wave constant? If this is the case, as hotpaw2 said, you won't detect the echo, not even by adding noise. For the echo to be heard, you need changes (in frequency or amplitude) to your signal... $\endgroup$ Dec 2, 2012 at 10:35
  • $\begingroup$ Ok so if I have a squarewave would I be able to hear any echo? Would the delay with decaying would work then? $\endgroup$ Dec 2, 2012 at 11:45
  • $\begingroup$ The problem is not with the waveform itself but with its stationarity. For an echo effect to be noticed, the sound needs to have changes in amplitude/frequency. From your question, it is not clear if the signal you want to add an echo to is a constant amplitude/frequency signal ; or a signal with changes of amplitude and frequency. $\endgroup$ Dec 2, 2012 at 15:00

1 Answer 1


As hotpaw2 said, you are not going to hear an echo or delay effect unless your signal changes, so you are not hearing it because you are sending in pure, unchanging signal. You might want to try sending a burst of sine waves every second or better yet a chirp or an actual recording of music or someone speaking. It will work best if you have periods of silence in your input.

Here is an explanation of how to create a delay or echo effect in c-like pseudo-code.


Your Answer

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

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