Learn R Programming

seewave (version 1.4.3)

savewav: Save .wav file

Description

Save sound data as .wav file

Usage

savewav(wave, f,
filename = NULL)

Arguments

wave
data describing the time wave to be exported.
f
sampling frequency of wave (in Hz).
filename
name of the new file. (by default the name of wave).

Details

This functions uses two functions from the package Sound: Sample and saveSample

See Also

as.Sample, saveSample, export.

Examples

Run this code
a<-synth(f=8000,d=2,cf=2000,plot=FALSE)
# the name of the file is automatically the name of the object
# here: "a.wav"
savewav(a,f=22050)
# if you wish to to change the name, use 'file' argument
savewav(a,f=22050,file="b.wav")

Run the code above in your browser using DataLab