Duration

Duration[expr]

returns the duration of expr.

Details

Examples

open allclose all

Basic Examples  (1)

Duration of an Audio object:

Scope  (5)

Duration of a Sound object:

A sound from a sequence of notes:

A Video object:

A TimeSeries object:

Duration of a financial time series:

Applications  (1)

Get the Audio duration in seconds:

Represent the duration in minutes:

Properties & Relations  (4)

Duration automatically optimizes the unit of the result:

For Audio, dividing the number of samples by the sample rate is equivalent to the duration:

Audio duration can be computed by dividing the number of samples by the sample rate:

The duration of audio files can be imported directly from the file:

Compare with the duration of the imported audio:

Duration returns approximate duration for video files:

Compare with the "Duration" element in Import:

Get exact durations for all tracks using "ExactDurations" element:

Computing "Duration" is typically faster than computing "ExactDurations":

Introduced in 2016
 (11.0)
 |
Updated in 2020
 (12.1)