pt2_duration: Calculate the duration of the module

View source: R/render.R

pt2_durationR Documentation

Calculate the duration of the module

Description

How long a module will play depends on several aspects such as the length of the pattern sequence table (pt2_pattern_table(), pt2_length()), the speed and tempo at which the patterns are defined, loops, pattern breaks and delay effects. The duration in seconds of the module is calculated by this function.

Usage

pt2_duration(x, options = pt2_render_options(), position = 0L, ...)

Arguments

x

Object for which to determine the duration. Should be of class pt2mod.

options

A list of options used for rendering the audio. Use pt2_render_options() to obtain default options, or modify them.

position

Starting position in the pattern sequence table (pt2_pattern_table()). Should be a non negative value smaller than the mule length (pt2_length()).

...

Ignored

Value

The duration in seconds (as a difftime class object)

Author(s)

Pepijn de Vries

Examples

mod <- pt2_read_mod(pt2_demo())

pt2_duration(mod)

ProTrackR2 documentation built on April 3, 2025, 9:21 p.m.