AudioTools
Play
play back audio data to a speaker
Calling Sequence
Parameters
Description
Examples
Compatibility
Play(audio, component)
audio
-
audio object to play back
component
(optional) string; name of the Speaker component to use.
The Play command plays audio data from the specified Audio object to a Speaker component.
If the component parameter is not specified, the default component name Speaker0 will be used.
In order to play back any of the following examples, open the Components Palette and insert a Speaker component.
with⁡AudioTools:
Play a stored audio file to the speaker.
audiofile≔FileTools:-JoinPath⁡audio/ding.wav,base=datadir
Play⁡Read⁡audiofile,Speaker0
Create a signal and play it back to the speaker:
Tone≔f↦Play⁡Create⁡x↦evalhf⁡sin⁡x⋅π⋅f22050,duration=1:
Tone⁡440
Tone⁡880
The AudioTools[Play] command was introduced in Maple 2015.
For more information on Maple 2015 changes, see Updates in Maple 2015.
See Also
AudioTools[Create]
SpeakerComponent
Download Help Document