Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


generates one second of audio of a given model.

generates t seconds of audio.

generates audio samples of the specified "type".

Details and OptionsDetails and Options

  • AudioGenerator can generate different types of audio, including oscillators or noises.
  • Possible settings for model include:
  • Silence:
  • "Silence"silence (zero) signal
  • Oscillators:
  • {"Sin",freq,phase}sine wave
    {"Triangle",freq,phase}triangle wave
    {"Sawtooth",freq,phase}sawtooth wave
    {"Square",freq,phase}square wave
    {"Pulse",freq,phase,width}rectangular wave using the duty cycle width
    {"Impulse",freq,phase}impulse signal
  • By default, freq=TemplateBox[{440, "Hz", hertz, "Hertz"}, Quantity], phase=TemplateBox[{0, "rad", radians, "Radians"}, Quantity], and width=TemplateBox[{25, "%", percent, "Percent"}, QuantityPostfix] are used.
  • The parameters freq, phase, and width can be a scalar value, a Quantity, an Audio object, a TimeSeries, or a pure function.
  • Noise:
  • "White"constant power spectral density
    "Pink"power spectral density that follows 1/f
    "Brown"power spectral density that follows
    "Blue"power spectral density that follows
    {"Color",α}power spectral density that follows with -2 α 2
    {"White",dist}random noise with values sampled from dist
    "PeriodicRandomNoise"sum of sinusoidal components with constant amplitude and random phase
  • Other:
  • fsample an arbitrary function f of time (in seconds)
    procgenerate samples from a random process proc
    tseriesgenerate samples from a TimeSeries tseries
  • AudioGenerator generates an audio object of "Real32" type. See the reference page for Audio for possible settings of "type".
  • AudioGenerator has the same options as Audio.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Generate one second of sinusoidal audio:

Click for copyable input

Generate two seconds of white noise:

Click for copyable input

Specify the frequency of a sinusoidal wave:

Click for copyable input

Control the frequency of the sinusoidal wave with a TimeSeries:

Click for copyable input
Introduced in 2016