Play - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


AudioTools

  

Play

  

play back audio data to a speaker

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Play(audio, component)

Parameters

audio

-

audio object to play back

component

-

(optional) string; name of the Speaker component to use.

Description

• 

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.

Examples

In order to play back any of the following examples, open the Components Palette and insert a Speaker component.

withAudioTools:

Play a stored audio file to the speaker.

audiofileFileTools:-JoinPathaudio/ding.wav,base=datadir

PlayReadaudiofile,Speaker0

Create a signal and play it back to the speaker:

TonefPlayCreatexevalhfsinxπf22050,duration=1:

Tone440

Tone880

Compatibility

• 

The AudioTools[Play] command was introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

See Also

AudioTools

AudioTools[Create]

SpeakerComponent