WOLFRAM

AudioFrequencyShift[audio,freq]

gives audio by shifting the spectrum of audio by freq.

AudioFrequencyShift[audio,freq,mix]

uses mix to control the ratio between the original and shifted audio.

AudioFrequencyShift[video,]

shifts the spectrum of the first audio track in video.

Details and Options

  • AudioFrequencyShift shifts every frequency f in the input signal to frequency .
  • The frequency freq can be a scalar or a frequency quantity, an Audio object, a pure function, or a TimeSeries.
  • The mixing parameter mix can be any real number between 0 and 1. The default value is 1.
  • With mix=0, only the original signal is returned; with mix=1, only the delayed signal is returned.
  • AudioFrequencyShift accepts a Method option. Possible settings are:
  • "UpperSideband"the spectrum is shifted by freq
    "LowerSideband"the spectrum is reversed and shifted by freq
    "AmplitudeModulation"both effects are present at the same time
  • The absolute amount of shift should be less than half of the Nyquist frequency.

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Shift the spectrum of an audio signal by 1000 Hz:

Out[3]=3

Plot the power spectrum of the original and shifted signals:

Out[6]=6

Mix the original signal with the shifted one:

Out[1]=1
Out[2]=2

Scope  (6)Survey of the scope of standard use cases

Control the ratio between the original and the frequency-shifted signal:

Out[3]=3

The shift given as a number is assumed to be in hertz:

Out[1]=1

Use a frequency quantity:

Out[2]=2

Time-varying frequency shift using a function:

Out[1]=1

Time-varying frequency shift using a TimeSeries:

Out[1]=1

Time-varying frequency shift using a control audio signal:

Out[1]=1

Process the audio track of a video:

Out[1]=1

Options  (2)Common values & functionality for each option

Method  (2)

AudioFrequencyShift can use three methods:

Out[4]=4

While "UpperSideband" and "LowerSideband" produce very similar results, "AmplitudeModulation" generates a different sound:

Out[2]=2
Out[3]=3

Applications  (2)Sample problems that can be solved with this function

Create a chorus effect using a small amount of shift while mixing in the original signal:

Out[2]=2

Use frequency shifting to produce complex inharmonic sounds:

Out[1]=1

Use frequency shifting to "tune" drum-like sounds:

Out[2]=2

Use frequency shifting to "mask" voices:

Out[3]=3

Properties & Relations  (1)Properties of the function, and connections to other functions

Shifting harmonically simple signals like sinusoids changes the perceived pitch:

Out[2]=2

Shifting complex signals alters the harmonic relationships between their components and can produce an inharmonic output:

Out[4]=4

Possible Issues  (1)Common pitfalls and unexpected behavior

The absolute value of the shift parameter needs to be less than one-quarter of the sample rate:

Out[2]=2

Increase the sampling frequency of the input to overcome this limitation:

Out[3]=3

Neat Examples  (2)Surprising or curious use cases

Simulate the behavior of an AM radio:

Shift the original signal to a higher frequency:

Out[4]=4

Reconstruct the original audio:

Out[5]=5

Time-varying frequency shift using a RandomWalkProcess:

Out[1]=1
Out[2]=2
Out[3]=3
Wolfram Research (2016), AudioFrequencyShift, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioFrequencyShift.html (updated 2024).
Wolfram Research (2016), AudioFrequencyShift, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioFrequencyShift.html (updated 2024).

Text

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

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

CMS

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

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

APA

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

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

BibTeX

@misc{reference.wolfram_2025_audiofrequencyshift, author="Wolfram Research", title="{AudioFrequencyShift}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/AudioFrequencyShift.html}", note=[Accessed: 05-June-2025 ]}

@misc{reference.wolfram_2025_audiofrequencyshift, author="Wolfram Research", title="{AudioFrequencyShift}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/AudioFrequencyShift.html}", note=[Accessed: 05-June-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_audiofrequencyshift, organization={Wolfram Research}, title={AudioFrequencyShift}, year={2024}, url={https://reference.wolfram.com/language/ref/AudioFrequencyShift.html}, note=[Accessed: 05-June-2025 ]}

@online{reference.wolfram_2025_audiofrequencyshift, organization={Wolfram Research}, title={AudioFrequencyShift}, year={2024}, url={https://reference.wolfram.com/language/ref/AudioFrequencyShift.html}, note=[Accessed: 05-June-2025 ]}