Renders a 16bit pulse-code modulation waveform from a ProTracker module. The rendered format can be played on a modern machine.
pt2_render(x, duration = NA, options = pt2_render_options(), ...)# S3 method for pt2mod
pt2_render(
x,
duration = NA,
options = pt2_render_options(),
position = 0L,
...
)
# S3 method for pt2samp
pt2_render(x, duration = 5, options = pt2_render_options(), note = "C-3", ...)
# S3 method for pt2patlist
pt2_render(x, duration = NA, options = pt2_render_options(), samples, ...)
# S3 method for pt2pat
pt2_render(x, duration = NA, options = pt2_render_options(), samples, ...)
# S3 method for pt2celllist
pt2_render(x, duration = 5, options = pt2_render_options(), samples, ...)
# S3 method for pt2cell
pt2_render(x, duration = 5, options = pt2_render_options(), samples, ...)
Rendered audio inheriting the audio::audioSample() class.
The object to be rendered
Duration of the rendered output in seconds. When set to NA
the duration of the module is calculated and used for rendering.
A list of options used for rendering the audio. Use
pt2_render_options() to obtain default options, or modify them.
Ignored
Starting position in the pattern sequence table (pt2_pattern_table()).
Should be a non negative value smaller than the mule length (pt2_length()).
Note to be played when x is a pt2samp class object. Defaults
to "C-3".
When rendering or playing patterns (or elements of it), samples are needed
to interpret the pattern. Pass the samples as a sample list (class pt2samplist).
Pepijn de Vries
mod <- pt2_read_mod(pt2_demo())
aud <- pt2_render(mod)
aud_samp <- pt2_render(mod$samples[[1]])
Run the code above in your browser using DataLab