View source: R/class_soundSample.R
write.soundSample | R Documentation |
Write a sound sample in .wav or .mp3 format.
write.soundSample(x, file)
x |
sound sample object. |
file |
string, destination file. Default file format is .wav. If file extension is .mp3, conversion to mp3 is attempted using ffmpeg, which hence needs to be available (see https://ffmpeg.org/). |
nothing - writing function.
sam <- soundSample(sin(2*pi*seq(0,1,,44100)*440)) # 1-second A (440 Hz)
write.soundSample(sam,file=tempfile())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.