Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

playMod

Play PTModule objects


Description

Converts PTModule objects into audio Waves, and plays them.

Usage

## S4 method for signature 'PTModule'
playMod(mod, wait = T, ...)

Arguments

mod

A PTModule object to be played.

wait

A logical value. When set to TRUE the playing routine will wait with executing any code until the playing is finished. When set to FALSE, subsequent R code will be executed while playing.

...

Arguments that are passed on to modToWave.

Details

Unfortunately, it was not feasible to create a routine that can directly interpret PTModule objects and play them simultaneously. Instead, the audio first needs to be rendered after which it can be played. This method therefore first calls modToWave and then playWave. Rendering may take some time and requires some balance between speed, quality and accuracy. See the documentation of the modToWave method for the control you have on these aspects.

Value

A Wave object, generated from the mod object, is returned.

Author(s)

Pepijn de Vries

See Also

Other play.audio.routines: playSample(), playWave()

Examples

## Not run: 
data("mod.intro")

## play the module and capture the audio Wave
wav <- playMod(mod.intro)

## End(Not run)

ProTrackR

Manipulate and Play 'ProTracker' Modules

v0.3.7
GPL-3
Authors
Pepijn de Vries [aut, cre, dtc]
Initial release
2020-02-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.