Duration - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


AudioTools

  

Duration

  

compute the duration of a recording, in seconds

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Duration(audArray)

Parameters

audArray

-

Array, Vector, or Matrix containing the audio data

Description

• 

The Duration command computes the duration of an audio recording, in seconds, based on the number of samples, and the samples per second as stored in the attributes of audArray.

• 

The audArray parameter must be a dense, rectangular, one or two dimensional Array, Vector, or Matrix with datatype=float[8],

Examples

> 

audiofile≔cat⁡kernelopts⁡datadir,/audio/stereo.wav:

> 

with⁡AudioTools:

> 

aud≔Read⁡audiofile

aud≔Sample Rate22050File FormatPCM File Bit Depth8Channels2Samples/Channel19962Duration0.90531⁢s

(1)
> 

Duration⁡aud

11091225

(2)
> 

evalf⁡

0.9053061224

(3)

See Also

Array

AudioTools

Matrix

Vector