AudioPad

AudioPad[audio,t]

adds t seconds of silence to the end of audio.

AudioPad[audio,{t1,t2}]

adds t1 seconds of silence to the beginning and t2 seconds to the end of audio.

AudioPad[audio,tspec,padding]

pads using the value or method specified by padding.

Details

  • The amount of padding can be a non-negative real number in seconds, a time quantity, or a samples quantity.
  • The following forms of padding can be specified:
  • 0zero (silence) padding
    vala constant value
    "Faded"a short faded padding followed by zero padding
    "Fixed"repetitions of the boundary value
    "Periodic"cyclic repetitions of the complete audio
    "Reflected"reflections of the audio at the boundary
    "Reversed"reversals of the complete audio

Examples

open allclose all

Basic Examples  (2)

Add two seconds of silence to the end of an audio object:

Add a second of silence to both ends:

Scope  (6)

Pad an audio object with silence:

Repeat the audio twice:

Pad the audio with its reverse:

Pad an audio object with silence:

Pad with a constant value:

Pad with a repetition of the boundary value:

Repeat the audio twice:

Pad the audio with its reverse:

Pad the audio with a short decay to zero:

Add a second of silence to the beginning and the end:

Specify the amount of padding as a time quantity:

Specify the amount of padding as a samples quantity:

Pad a stereo audio object:

Applications  (4)

Use faded padding to avoid clicks:

Add padding to an audio object before applying a reverb:

Pad an audio object before an AudioJoin operation:

Pad an audio object to match the duration of a different one:

Introduced in 2016
 (11.0)
 |
Updated in 2017
 (11.1)