AudioTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Audio Processing : AudioTools/Play

AudioTools

  

Play

  

plays 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:

Tonef→PlayCreatex→evalhfsinx*2*Pi*f/44100,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