Learn R Programming

sound (version 1.1)

saveSample: Save a Sample Object as a WAV File

Description

Save a Sample object to disk as a wav file.

Usage

saveSample(s, filename, overwrite=FALSE)

Arguments

s
a Sample object.
filename
a string giving the path and the name of the destination file.
overwrite
logical. If FALSE and filename already exists, an error will be reported. Otherwise the old file will be deleted.

See Also

loadSample

Examples

Run this code
s <- Sine(440,1)
saveSample(s,"sine.wav")

Run the code above in your browser using DataLab