Get or set the position of the music player. rewind() moves the position to the start of the song.

position_seconds(mod, ...)

position_seconds(mod, ...) <- value

rewind(mod, ...)

set_position_order_row(mod, order, row, ...)

Arguments

mod

A tracker module object of class openmpt.

...

Ignored

value

Position in seconds to move the player to. The value is rounded to its nearest order and row position.

order

Index of the position in the pattern sequence table (starts at 0).

row

Index of the row in the current pattern table (starts at 0).

Value

Returns NULL invisibly, or the updated object in case of the assign operator (<-).

Examples

mod <- demo_mod()
position_seconds(mod)
#> [1] 0
position_seconds(mod) <- 10.2
set_position_order_row(mod, 1, 4)
rewind(mod)