export | R Documentation |
Export sound data as a text file that can be read by a sound player like 'Goldwave'
export(wave, f = NULL, channel = 1, filename = NULL, header=TRUE, ...)
wave |
an R object. |
f |
sampling frequency of |
channel |
channel of the R object, by default left channel (1). |
filename |
name of the new file. (by default the name of |
header |
either a logical or a character vector,
if |
... |
other |
Creates a new text file with a header describing the main features of the sound (wave). For instance, for a 2 s sound with a sampling frequency of 8000 Hz, the header will be: [ASCII 8000Hz, Channels: 1, Samples: 160000, Flags: 0]. This type of file can be read by sound players like Goldwave (http://www.goldwave.com/).
Jerome Sueur sueur@mnhn.fr
a<-synth(f=8000,d=2,cf=2000,plot=FALSE)
export(a,f=8000)
unlink("a.txt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.