AudioFade

AudioFade[audio]

returns audio in which the beginning and end of audio are faded.

AudioFade[audio,t]

fades the first and last t seconds of audio.

AudioFade[audio,{t1,t2}]

fades t1 seconds at the beginning and t2 seconds at the end.

AudioFade[video,]

fades the first audio track in video.

Details and Options

  • AudioFade fades in the signal by gradually increasing the volume of the signal from 0 to the full amplitude of the signal at the beginning, and similarly fades out the end of the signal.
  • Fading a signal can be used to remove clicks when the audio is played back by avoiding potential discontinuities.
  • AudioFade[audio] is equivalent to AudioFade[audio,.001].
  • The shape of the ramp can be specified using a Method option. Possible settings are:
  • "Cosine"cosinusoidal fade
    "Exp"exponential fade
    "Linear"linear fade
    "Log"logarithmic fade
    "Rounded"rounded fade
    "SCurve"sinusoidal fade (default)

Examples

open allclose all

Basic Examples  (2)

Fade in a sinusoidal audio signal:

Plot the waveforms of the original and resulting signals:

Specify different fading times for the beginning and end of the signal using exponential fading:

Scope  (3)

The fade time can be specified as a time quantity:

Specify the fade time for beginning and end independently:

Specify the number of samples to be faded:

Process the audio track of a video:

Options  (2)

Method  (2)

By default, a sinusoidal curve is used to add the fade:

Specify the fade shape:

Applications  (2)

AudioFade is useful to avoid clicks due to sudden phase jumps when joining multiple audio objects:

Without fading, there is a sudden jump at the joining point:

Eliminate the jump:

Use AudioFade to create a sound with a slow attack time:

Wolfram Research (2016), AudioFade, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioFade.html (updated 2024).

Text

Wolfram Research (2016), AudioFade, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioFade.html (updated 2024).

CMS

Wolfram Language. 2016. "AudioFade." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/AudioFade.html.

APA

Wolfram Language. (2016). AudioFade. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AudioFade.html

BibTeX

@misc{reference.wolfram_2024_audiofade, author="Wolfram Research", title="{AudioFade}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/AudioFade.html}", note=[Accessed: 30-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_audiofade, organization={Wolfram Research}, title={AudioFade}, year={2024}, url={https://reference.wolfram.com/language/ref/AudioFade.html}, note=[Accessed: 30-December-2024 ]}