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