Some openmpt modules may contain multiple subsongs. Use these functions to get the current subsong index, or select a different one.

subsong(mod, ...)

subsong(mod, ...) <- value

Arguments

mod

A tracker module object of class openmpt.

...

Ignored

value

An integer index of the subsong to select.

Value

Returns the integer index of the currently selected subsong. In case of the assign operator (<-) it returns a version of mod with an update selection for the subsong

Examples

mod <- demo_mod()
subsong(mod)
#> [1] 0
## a value of -1 plays all subsongs consecutively
subsong(mod) <- -1