AudioResample

AudioResample[audio,sr]

resamples audio to have the sample rate of sr.

Details and Options

  • AudioResample can be used to convert between any sampling rates, including the common ones, e.g. telephone, CD, and DVD.
  • The sample rate sr can be given as a positive integer, assumed to be in hertz, a quantity, or a Scaled parameter.
  • The following common sampling rates are also supported:
  • "Telephone"8000used for telephone signal
    "CD"44100used in audio CD, MP3, etc.
    "DVD"48000DVD, professional video equipment, etc.
    "DVDAudio"96000DVD-Audio, Blu-ray, etc.
  • AudioResample works with Audio objects of any number of channels.
  • The following options can be given:
  • AntialiasingTruewhether to antialias when downsampling
    Padding0padding method
    ResamplingAutomaticresampling method
  • For possible settings for Padding, see the reference page for AudioPad.

Examples

open allclose all

Basic Examples  (1)

Resample an audio object:

Scope  (3)

Specify the sample rate using a frequency Quantity:

Specify the sample rate using a Scaled value:

Specify the sample rate using a preset value:

Options  (3)

Antialiasing  (1)

When resampling to a lower sample rate, an antialiasing filter is applied by default:

Resampling by a factor of .5 with antialiasing filter:

Use Antialiasing->False:

Padding  (1)

The default padding value is 0:

Specify a different padding:

Reasampling  (1)

By default, "Lanczos" resampling is used:

Use a different resampling scheme:

Applications  (2)

Convert an audio object in CD quality (44.1 KHz) to DVD quality (48 KHz):

Resampling to a lower sample rate reduces the memory used by the audio object:

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

Text

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

BibTeX

@misc{reference.wolfram_2021_audioresample, author="Wolfram Research", title="{AudioResample}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/AudioResample.html}", note=[Accessed: 27-July-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_audioresample, organization={Wolfram Research}, title={AudioResample}, year={2016}, url={https://reference.wolfram.com/language/ref/AudioResample.html}, note=[Accessed: 27-July-2021 ]}

CMS

Wolfram Language. 2016. "AudioResample." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AudioResample.html.

APA

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