Play
Play[f,{t,tmin,tmax}]
creates an object that plays as a sound whose amplitude is given by f as a function of time t in seconds between tmin and tmax.
Details 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:
-
DisplayFunction Automatic function for generating output to display PlayRange All the range of amplitude levels to include SampleDepth 8 how many bits to use to represent each amplitude level SampleRate 8000 how many times per second amplitude samples should be generated - Play[{f1,f2},{t,tmin,tmax}] produces stereo sound. The left‐hand channel is given first.
- Play[{f1,f2,…},…] generates sound output on any number of channels.
Examples
open allclose allScope (5)
Options (2)
Applications (6)
Properties & Relations (2)
Wolfram Research (1991), Play, Wolfram Language function, https://reference.wolfram.com/language/ref/Play.html (updated 2007).
Text
Wolfram Research (1991), Play, Wolfram Language function, https://reference.wolfram.com/language/ref/Play.html (updated 2007).
CMS
Wolfram Language. 1991. "Play." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/Play.html.
APA
Wolfram Language. (1991). Play. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Play.html