The Wolfram Language provides built-in support for both programmatic and interactive audio processing, fully integrated with other powerful mathematical and algorithmic capabilities. You can process audio objects by applying linear and nonlinear filters, add effects, and analyze them using audio-specific functions or by exploiting the extensive integration with the rest of the Wolfram Language.
Audio signals can be used as input to many signal processing functions.
gives the discrete-time approximation, with sampling period τ, of the continuous-time systems models lsys
Some of the available filter models and additional utilities.
The simplest way to use one of the analog (continuous-time) filter models is to discretize the transfer function using ToDiscreteTimeModel and apply the result to an audio object using RecurrenceFilter.
Apply a resonant biquadratic filter to an audio object:
mix the channel of audio to the specified desttype
Some common audio effects.
Use pitch shifting and time stretching to independently modify pitch and duration of an audio signal.
Slow down an audio object:
Shift the pitch of an audio object up:
Delay and reverberation effects can be used to immerse a recording in a virtual environment or to produce special effects.
Apply a delay or reverb effect:
Perform Karplus–Strong synthesis by adding a short delay with a high feedback value to a burst of noise. This will simulate the sound of a vibrating string:
Downmixing and upmixing to an arbitrary number of channels can be achieved using AudioChannelMix.
Downmix and upmix a multichannel audio object:
It is possible to alter a recording by taking advantage of performing arithmetic operations on the Audio object. All Wolfram Language operators and functions with attributes NumericFunction or Listable are overloaded to work with audio objects.
Apply a smooth distortion to an audio object using the Tanh function:
Use the ChebyshevT function to obtain a "waveshaper" effect:
Multiply an audio object with a sine wave to get a "ring modulator" effect:
Analysis of the Whole Signal
Properties can be computed on a recording both on a global and a local scale.
Some of the functionality to compute global measurements.
Both time domain and frequency domain properties can be measured with AudioMeasurements. The properties are computed on the average sample values over the channels of the audio object.
Compute time domain properties of a recording:
Compute frequency domain properties of a recording:
Compute other measurements by directly applying built-in statistical functions.
Compute moment and entropy of an audio object:
Unlike AudioMeasurements, overloaded functions are applied to the flattened version of the data. If the input is a multichannel audio object, the sample values from all channels will be flattened in a single array.
Compute statistical properties of a recording:
Analysis of the Partitioned Signal
In addition to global properties of audio objects, it is also possible to compute measurements locally.
find the intervals of audio for which the criterion crit is satisfied
Some of the functionality to compute local measurements..
In AudioLocalMeasurements, properties are computed locally. The signal is partitioned according to the PartitionGranularity specification, and the requested property is computed on each partition. The result is returned as a TimeSeries whose timestamps correspond to the center of each partition.
Compute the RMS amplitude on 40 ms partitions with an offset of 1 ms:
Different encoders can be used to compute various kinds of features. Some maintain all of the information of the original signal (like "Audio" and "AudioSTFT"), while others provide a compromise between discarding some information but dramatically reducing the dimensionality (like "AudioMFCC").
Visualize features computed using different encoders:
Using the encoders, it is easy to train networks from scratch to solve audio-related tasks and produce measurements of the resulting performance.