if (FALSE) {
## First get an audio sample from the ProTrackR package
snare.samp <- ProTrackR::PTSample(ProTrackR::mod.intro, 2)
## The sample can easily be converted into an IFFChunk:
snare.iff <- WaveToIFF(snare.samp)
## You could also first convert the sample into a Wave object:
snare.wav <- as(snare.samp, "Wave")
## And then convert into an IFFChunk. The result is the same:
snare.iff <- WaveToIFF(snare.wav)
## You could also use a sine wave as input (although you will get some warnings).
## This will work because the vector of numeric data can be coerced to
## a WaveMC object
sine.iff <- WaveToIFF(sin((0:2000)/20))
}
Run the code above in your browser using DataLab