AudioSpectralMap
✖
AudioSpectralMap

transforms audio by applying the function f to its short-time Fourier transform.
applies the function f to the list of short-time Fourier transforms of all audioi.
Details and Options

- AudioSpectralMap can be used to arbitrarily modify the signal both in the time domain and the frequency domain. Spectral filters can be used to diminish, highlight or modify specific frequencies at specific times, e.g. removing noise.
- AudioSpectralMap applies the function f to the short-time Fourier transform and computes the inverse using the overlap-add method.
- Function f takes values of short-time Fourier transform as the first argument. Optionally, frequency and time can be given to f as the second and third arguments:
-
#Value or #1 value of the short-time Fourier transform #Frequency or #2 frequency in Hz #Time or #3 time in seconds - For multichannel audio objects, the transformation is performed separately on each channel.
- When multiple audio signals are present, #Value is a list of values. Use #Value〚i〛 for audioi.
- AudioSpectralMap accepts a PartitionGranularity option that can specify the duration of each partition and the offset, as well as the smoothing window.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (3)Survey of the scope of standard use cases
Multiply each spectral component by its frequency:

https://wolfram.com/xid/0b7fpd1912dt9yn8-pjndz4

https://wolfram.com/xid/0b7fpd1912dt9yn8-i7oizq

Multiply each spectral component by the time:

https://wolfram.com/xid/0b7fpd1912dt9yn8-vbulwi


https://wolfram.com/xid/0b7fpd1912dt9yn8-5wxvqa
Multiply the two short-time Fourier transforms:

https://wolfram.com/xid/0b7fpd1912dt9yn8-kla8tb

Use the magnitude of the first audio and the phase of the second:

https://wolfram.com/xid/0b7fpd1912dt9yn8-cd6uot

Process the audio track of a video:

https://wolfram.com/xid/0b7fpd1912dt9yn8-pjlg25

Options (1)Common values & functionality for each option
PartitionGranularity (1)
By default, automatic partitioning suitable for spectral filtering is used:

https://wolfram.com/xid/0b7fpd1912dt9yn8-yfhse0

https://wolfram.com/xid/0b7fpd1912dt9yn8-klokb7


https://wolfram.com/xid/0b7fpd1912dt9yn8-7guadn

Specify the partition size, offset and smoothing window:

https://wolfram.com/xid/0b7fpd1912dt9yn8-htduxn

Applications (8)Sample problems that can be solved with this function
Denoise an audio signal by eliminating all components with small amplitude:

https://wolfram.com/xid/0b7fpd1912dt9yn8-tqlnma


https://wolfram.com/xid/0b7fpd1912dt9yn8-h2dycv


https://wolfram.com/xid/0b7fpd1912dt9yn8-w2oanv

Create a lowpass filter by removing components smaller than 1000Hz:

https://wolfram.com/xid/0b7fpd1912dt9yn8-rw14ob

https://wolfram.com/xid/0b7fpd1912dt9yn8-kdqard


https://wolfram.com/xid/0b7fpd1912dt9yn8-0c4prr


https://wolfram.com/xid/0b7fpd1912dt9yn8-4i87tq


https://wolfram.com/xid/0b7fpd1912dt9yn8-1gnx1p


https://wolfram.com/xid/0b7fpd1912dt9yn8-hpl6sl

Zero out all the components at times smaller than 0.5 seconds:

https://wolfram.com/xid/0b7fpd1912dt9yn8-14lr7l

https://wolfram.com/xid/0b7fpd1912dt9yn8-14qn6a


https://wolfram.com/xid/0b7fpd1912dt9yn8-wnm57d


https://wolfram.com/xid/0b7fpd1912dt9yn8-nhui4a

Assign a random phase to all the components to achieve a whisper effect:

https://wolfram.com/xid/0b7fpd1912dt9yn8-l5ojqz

Assign a phase equal to zero to all the components to achieve a robot-like result:

https://wolfram.com/xid/0b7fpd1912dt9yn8-7dpdwg

Lower the amplitude of quiet components, effectively performing a simple denoise:

https://wolfram.com/xid/0b7fpd1912dt9yn8-iwmg0l

https://wolfram.com/xid/0b7fpd1912dt9yn8-8757kx

https://wolfram.com/xid/0b7fpd1912dt9yn8-2vf66y


https://wolfram.com/xid/0b7fpd1912dt9yn8-lobyj1

Completely zero out the quiet components:

https://wolfram.com/xid/0b7fpd1912dt9yn8-lcyj9p

https://wolfram.com/xid/0b7fpd1912dt9yn8-cggso5


https://wolfram.com/xid/0b7fpd1912dt9yn8-grcmvt

Create a time-dependent highpass filter:

https://wolfram.com/xid/0b7fpd1912dt9yn8-3ga1qn

https://wolfram.com/xid/0b7fpd1912dt9yn8-4o8i3c

https://wolfram.com/xid/0b7fpd1912dt9yn8-kqccgd


https://wolfram.com/xid/0b7fpd1912dt9yn8-vq5n2o

Denoise a signal by subtracting a noise profile:

https://wolfram.com/xid/0b7fpd1912dt9yn8-yagd1f


https://wolfram.com/xid/0b7fpd1912dt9yn8-va1on6

Trim a part of the signal that contains only noise:

https://wolfram.com/xid/0b7fpd1912dt9yn8-iuuyan

Compute the magnitude spectrum of the noise:

https://wolfram.com/xid/0b7fpd1912dt9yn8-45lkyc

https://wolfram.com/xid/0b7fpd1912dt9yn8-v9r6cu
Create an interpolating function on the frequency domain using the smoothed noise spectrum:

https://wolfram.com/xid/0b7fpd1912dt9yn8-ehm7ts


https://wolfram.com/xid/0b7fpd1912dt9yn8-j8cp2g

Subtract from each component the corresponding noise spectrum magnitude:

https://wolfram.com/xid/0b7fpd1912dt9yn8-dh41w0


https://wolfram.com/xid/0b7fpd1912dt9yn8-kflbau

Properties & Relations (1)Properties of the function, and connections to other functions
Apply identity to each spectral component:

https://wolfram.com/xid/0b7fpd1912dt9yn8-dgmq7g

https://wolfram.com/xid/0b7fpd1912dt9yn8-54qgms

This operation is not an identity operation, due to the overlap and add during the inverse transform:

https://wolfram.com/xid/0b7fpd1912dt9yn8-4cxmjj

However, the result only has small discrepancies compared to the original signal:

https://wolfram.com/xid/0b7fpd1912dt9yn8-9m5h7n

Wolfram Research (2017), AudioSpectralMap, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioSpectralMap.html (updated 2024).
Text
Wolfram Research (2017), AudioSpectralMap, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioSpectralMap.html (updated 2024).
Wolfram Research (2017), AudioSpectralMap, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioSpectralMap.html (updated 2024).
CMS
Wolfram Language. 2017. "AudioSpectralMap." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/AudioSpectralMap.html.
Wolfram Language. 2017. "AudioSpectralMap." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/AudioSpectralMap.html.
APA
Wolfram Language. (2017). AudioSpectralMap. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AudioSpectralMap.html
Wolfram Language. (2017). AudioSpectralMap. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AudioSpectralMap.html
BibTeX
@misc{reference.wolfram_2025_audiospectralmap, author="Wolfram Research", title="{AudioSpectralMap}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/AudioSpectralMap.html}", note=[Accessed: 29-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_audiospectralmap, organization={Wolfram Research}, title={AudioSpectralMap}, year={2024}, url={https://reference.wolfram.com/language/ref/AudioSpectralMap.html}, note=[Accessed: 29-March-2025
]}