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

Wolfram Research (2016), Duration, Wolfram Language function, https://reference.wolfram.com/language/ref/Duration.html (updated 2020).

Text

Wolfram Research (2016), Duration, Wolfram Language function, https://reference.wolfram.com/language/ref/Duration.html (updated 2020).

CMS

Wolfram Language. 2016. "Duration." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/Duration.html.

APA

Wolfram Language. (2016). Duration. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Duration.html

BibTeX

@misc{reference.wolfram_2022_duration, author="Wolfram Research", title="{Duration}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/Duration.html}", note=[Accessed: 28-March-2023 ]}

BibLaTeX

@online{reference.wolfram_2022_duration, organization={Wolfram Research}, title={Duration}, year={2020}, url={https://reference.wolfram.com/language/ref/Duration.html}, note=[Accessed: 28-March-2023 ]}