Wolfram Language & System 10.3 (2015)|Legacy Documentation

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


creates an object that plays as a sound whose amplitude is given by f as a function of time t in seconds between and .

Details and OptionsDetails and Options

  • Play returns a Sound object, which displays in StandardForm as a button that can be clicked to play the sound.
  • Play treats the variable t as local, effectively using Block.
  • Play has attribute HoldAll, and evaluates f only after assigning specific numerical values to t.
  • In some cases it may be more efficient to use Evaluate to evaluate f symbolically before specific numerical values are assigned to t.
  • The following options can be given:
  • DisplayFunctionAutomaticfunction for generating output to display
    PlayRangeAllthe range of amplitude levels to include
    SampleDepth8how many bits to use to represent each amplitude level
    SampleRate8000how many times per second amplitude samples should be generated
  • Play[{f1,f2},{t,tmin,tmax}] produces stereo sound. The lefthand channel is given first.
  • Play[{f1,f2,},] generates sound output on any number of channels.
Introduced in 1991
| Updated in 2007