When using the Play function with a simple Sin wave, the audio clicks/pops at the beginning and end of the audio sample. How can I make a quick ~20 millisecond fade in as it starts to play and another ~20 ms fade out at the end to eliminate the clicks/pops? If possible, I'd rather not use CosineWindow as it takes too long to fade in/out. Thank you!

Play[Sin[440 2 Pi t], {t, 0, 2}]
  • 1
    $\begingroup$ Can't you use audiofade? $\endgroup$ – Lou Jun 12 '18 at 18:58
 LogisticSigmoid[(5 t)/0.2 - 5]
  LogisticSigmoid[(5 (2 - t))/0.2 - 5]
  Sin[440 2 Pi t]
 , {t, 0, 2}

Mathematica graphics

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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