AudioSpectralTransformation

AudioSpectralTransformation[f,audio]

returns a modified version of audio by applying a time-frequency transformation f to its short-time Fourier transform.

Details and Options

  • Applying an arbitrary time-frequency transformation to the short-time Fourier transform of audio signals can create interesting audio modifications and effects for creative use.
  • AudioSpectralTransformation computes the short-time Fourier transform of audio, maps every value at position f[{time,freq}] to {time,freq}, and computes the inverse using the overlap-add method.
  • The following options can be given:
  • DataRange Automaticranges to assume for time and frequency
    Padding0padding scheme to use
    PartitionGranularity Automaticaudio partitioning specification
    ResamplingAutomaticresampling method
  • By default, DataRange->{{0,dur},{0,sr/2}} is used, where dur and sr are duration and sample rate of audio.

Examples

open allclose all

Basic Examples  (1)

Modify the spectrogram of the signal:

Scope  (3)

Transform only along the time axis:

Transform only along the frequency axis:

Transform along both time and frequency axes:

Options  (2)

DataRange  (1)

By default, the data range is {{0,duration},{0,samplerate/2}}:

Specify a different data range for the function:

PartitionGranularity  (1)

Use the PartitionGranularity option to change the quality of the result:

Applications  (5)

Compress the time and do a time-dependent frequency stretching:

Apply a curvilinear distortion to the spectrogram:

Quantize the spectrogram both in frequency and time:

Create a time-dependent frequency shift:

Apply a fisheye transformation to the spectrogram:

Properties & Relations  (4)

Performing an identity operation does not return the input sample values:

Even in the case of an identity, a short-time Fourier transform followed by an overlap add operation is performed. The result only has minor discrepancies with the input:

Create a crude pitch-shifting effect:

Compare to AudioPitchShift:

Create a crude time-stretching effect:

Compare to AudioTimeStretch:

Create a crude frequency-shifting effect:

Compare to AudioFrequencyShift:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2023_audiospectraltransformation, author="Wolfram Research", title="{AudioSpectralTransformation}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/AudioSpectralTransformation.html}", note=[Accessed: 29-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_audiospectraltransformation, organization={Wolfram Research}, title={AudioSpectralTransformation}, year={2017}, url={https://reference.wolfram.com/language/ref/AudioSpectralTransformation.html}, note=[Accessed: 29-March-2024 ]}