Renders ModPlug Tracker music to an audio file and encodes it to a desired output format (e.g. .mp3, .ogg, etc) using av::av_audio_convert().

convert_mod(
  mod,
  file,
  start_order = 0L,
  start_row = 0L,
  sample_rate = 44100L,
  duration = NA_real_,
  verbose = FALSE,
  ...
)

Arguments

mod

A tracker module object of class openmpt

file

Output audio file where the rendered audio is stored. The file name extension is used to determine the type of encoding to be applied.

start_order

Starting position (integer index starting at 0) in the pattern sequence table.

start_row

Starting row (integer index starting at 0) of the pattern table.

sample_rate

Output sample rate in Hz (samples per seconds).

duration

Duration in seconds. Rendered sample will not be longer than this duration. if set to NA_real_ it is ignored and the module keeps rendering conform the specified control().

verbose

Passed on to av::av_audio_convert().

...

Ignored

Value

Returns NULL invisibly

Examples

mod <- demo_mod()

destination <- tempfile(fileext = ".mp3")

convert_mod(mod, destination, duration = 2)